Easy State: 一个使用纯原生JavaScript替换React的setState的库
Easy State: 一个使用纯原生JavaScript替换React的setState的库v5.0.0
solkimicreb released this
Breaking changes
- The auto bind feature got removed from both
store
andview
.
Features
- Added integration for an experimental debugger. You can test this out with
view(Comp, { devtool: console.log })
, the actual visual debugger is still in the making.
Fixes
- Added reactivity support for
in
operations. - Fixed reactivity in case of mutating a sparse array in an unused index, which is smaller then its current length.
v4.1.2
solkimicreb released this
Fixes
- Fixed vanilla
setState
behavior. It is still not advised to usesetState
, use local stores instead.
Other Changes
- Removed dynamic type validations. Use TypeScript, if you need type safety.
v4.1.1
solkimicreb released this
Fixes
- Expose TypeScript type definitions on npm
v4.1.0
solkimicreb released this
Features
- Added TypeScript type definitions
v4.0.1
solkimicreb released this
Fixes
- Removed package-lock
v4.0.0
solkimicreb released this
Breaking changes
- Renamed
easyComp
toview
. - Renamed
easyState
tostore
. - Removed the observable
this.store
oneasyComp
components. Usethis.store = store({})
instead to create local observable stores yourself.
Features
- Uses
setState
instead offorceUpdate
behind the scenes. This delegates render scheduling to React, which makes lifecycle hooks more predictable and supports React Fiber’s priority based render scheduling.
Breaking changes
- Rename
component.state
tocomponent.store
.
Downloads
Fixes
- Fix a critical bug with the build process.
Downloads
Breaking changes
-
Easy State has two named exports (
easyComp
andeasyStore
) instead of the default exportedeasyState
. (easyState
becameeasyComp
). -
Defining your own
componentShouldUpdate
will throw on error from now on. It should not be defined, as it is already optimized byeasyComp
.
Features
- Added
easyStore
for global state management.
Downloads
Fixes
- Fixed a bug where child component's wouldn't rerender on alternating shallow and deep prop mutations.
- Fixed
shouldComponentUpdate
being always overwritten. From now user definedshouldComponentUpdate
is prioritized over Easy State's internal one, but it is discouraged (as the internal one is pretty optimal.)
Downloads
Fixes
Changed shouldComponentUpdate
to update on shallow prop changes.
Performance
Removed unnecessary cleanup logic. Explicit unobserve is only necessary when the state and the component may live without each other.
Downloads
Watchers:16 |
Star:885 |
Fork:26 |
创建时间: 2017-05-23 23:17:43 |
最后Commits: 昨天 |
许可协议:MIT |
v5.0.1
Assets
Fixes