:ghost: Tiny Concurrent UI library with Fiber.
算法简化,O(N),更好的适配嵌入式
[core] It's just the stability of the algorithm, there is no new feature. [test] Use playwright + zora
A new technology can improve the performance by ten times.
At present, fre is four times faster than react and three times faster than Vue.
auto updates
createRoot
startTransition
** New reconciliation algorithm **
https://github.com/yisar/fre/pull/200
Fre now uses a new diff algorithm, which can traverse from both ends and handle common prefixes and suffixes
This is also the optimization used in Vue, Inferno, IVI and other frameworks, which is much better than react.
** todo **
Use recursion instead of regenerating a effect list
https://github.com/facebook/react/pull/19673
FragmentDocument for Component and refactor h function.
Fre2 is beta now!
Thanks for @shadowvzs @prettykernel @mindplay-dk
Demo is here: https://github.com/yisar/fre/blob/master/demo/src/resume-exception.tsx
There is a few change in useReducer. If the state is to be used to throw promise, it needs to be marked with *
.
All file move to typescript, and in the future, we should explore how to reduce the code size with typescipt.
No need requestAnimationFrame for effects, and state should defer to update.
For babel8 and Typescript4.1
Fre2 represents the basic completion of Concurrent mode, including time slicing and algebraic effects. We will continue to explore faster performance, smaller size and better codes.
Thank you very much!