Skip to content

Releases: andrejewski/raj

Runtime and Effects

17 Jul 01:40
Compare
Choose a tag to compare

This patch release adds the raj/effect module which contains helpers for working with effects. Also, the React bindings have been decoupled from the runtime, which now lives in raj/runtime. With this decomposition in place it will be easier to break out React support into its own project and support more view libraries in the future. Until then, React integration tests have been written for the bindings.

Strict Consistency

15 Jul 02:30
Compare
Choose a tag to compare

This patch release changes up some syntax which took some thought.

The init() and update() are now consistent with each other and removes ambiguity from their return arguments. Both functions now must return an array of [newState, optionalEffect] always and the shorthand return of newState is no longer supported. The shorthand would have been a concern if newState were an array. Also when testing an update() or init() the developer would have to know the implementation details of the init() or update() to know how to test the shorthand versus full. Without the shorthand, testing is a lot more clear.

Also, the first argument to update() is now the message, the current state is second. This decision was made because more often than not the state is derived from the message and may not even need to rely on an existing model. So when testing calling update(message) is more appealing than update(null, message). This also has implications for currying if anyone is into that.

Yells at You

10 Jul 03:49
Compare
Choose a tag to compare

This patch release adds plenty of assertions to Raj to prevent misuse with better error messages. You know must also pass React directly to the React bindings; this makes it easier for you to use a custom version of React (if anyone actually does that).