Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove message module #8

Merged
merged 1 commit into from
Aug 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ npm install raj

## Documentation

- `raj/message`: define message and message unions
- `message([displayName])`: create a message
- `message.union([displayName, ] messages)`: create a message union
- `raj/effect`: group and transform effects
- `effect.map(mapper, effect)`: transforms the dispatched values of `effect` using the function `mapper`
- `effect.batch(effects)`: group an array of effects into a single effect
Expand Down Expand Up @@ -41,7 +38,7 @@ The view and any side-effects communicate by dispatching messages.
Building any app follows the same steps:

1. Define your data model with `init(flags)`
1. Define your messages with `message/message.union`
1. Define your messages with something like [`tagmeme`](https://github.com/andrejewski/tagmeme)
1. Define your behaviors with `update(message, state)`
1. Define your effects as functions which accept a dispatch function
1. Define your view with `view(state, dispatch)`
Expand Down
2 changes: 1 addition & 1 deletion examples/make-n-model.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import message from 'raj/message'
import react from 'raj/react'
import message from 'tagmeme'

export function init () {
return {
Expand Down
2 changes: 1 addition & 1 deletion examples/search.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import message from 'raj/message'
import react from 'raj/react'
import message from 'tagmeme'

export function init () {
return [{
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
throw new Error('Do not import/require raj directly, use "raj/message" or "raj/react"')
throw new Error('Do not import/require raj directly, use "raj/runtime" or "raj/effect"')
96 changes: 0 additions & 96 deletions message.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"keywords": [
"best",
"framework",
"message",
"runtime",
"react"
],
"license": "MIT",
Expand Down
84 changes: 0 additions & 84 deletions test/message.js

This file was deleted.