You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In imperatively written code, you describe step-by-step how to process data. With `xreact`, we simply define data transformations, then compose them to form our data flow. There are no variables, no intermediate state, and no side effects in your data flow's data composition!
31
+
In imperatively code, you have to describe verbose of how to process data. With `xreact`, we simply define data transformations, then compose them to form data flow. There are no variables, no intermediate state, and no side effects in your data flow's data composition!
32
32
33
33
### Typesafe and scalable
34
-
xReact is 100% Typescript!, abstract Stream as Higher Kind type so easier to bring new FRP lib to integrete with xreact.
34
+
xReact is 100% Typescript! Turn your runtime bugs into compile time errors, fail and fix early.
35
35
36
-
### Composable and Reusable `Plan`
36
+
### High level but 0 cost abstraction
37
37
In Redux, reducers' use of `switch` statements can make them difficult to compose. Unlike reducers, the function `x` return is simply a function which can easily compose.
what really happen behind compose is actually ES6 style mixin, so there won't be any extra layer of HoC and no any performance overhead.
46
+
What really happen behind compose is actually ES6 style mixin, so there won't be any extra layer of HoC and no any performance overhead.
47
47
48
-
### Easy to test, no need for mocks
49
-
Because UI and UI behavior are loosely coupled, you can test a React component by just passing it data. Behaviors can be tested by calling actions and then verifying the state.
50
-
51
-
### Async actions made easy
48
+
### Asynchronous made easy
52
49
Asynchronous functions, such as Promises, can be converted to a stream and then flat-mapped.
where `fetch(url)` will return a `Promise`, and fromPromise will transform a `Promise` into `Observable`, so you can flat it in intent stream which is also a `Observable`.
60
57
61
58
### Reactive libs of your choice
62
-
xReact came with 2 FRP libs of choices, rxjs and mostjs, for any new lib you only need to implement the `StaticStream` with your prefered lib as Higher Kind Type.
59
+
xReact came with 2 FRP libs of choices, rxjs and mostjs, for any new libs you only need to implement the `StaticStream` with your preferred lib as Higher Kind Type, just like how we done for [mostjs](https://github.com/reactive-react/xreact/blob/master/src/xs/most.ts).
63
60
64
-
more details about HKT implementation in TypeScript is [here](https://github.com/gcanti/fp-ts)
61
+
More details about HKT implementation in TypeScript is [here](https://github.com/gcanti/fp-ts), but you don't really need to know this.
65
62
66
63
## Copyright and License
67
64
All code is available to you under the MIT license. The design is informed by many other projects:
0 commit comments