tracked-redux:自动追踪的Redux

时间:2021-05-13 05:12:08
【文件属性】:
文件名称:tracked-redux:自动追踪的Redux
文件大小:791KB
文件格式:ZIP
更新时间:2021-05-13 05:12:08
JavaScript 跟踪的Redux 该库提供的自动跟踪版本。 import { createStore } from 'tracked-redux' ; const store = createStore ( ( state = { todos : [ ] } , action ) => { if ( action . type === 'ADD_TODO' ) { return { todos : [ ... state . todos , action . todo ] } ; } return state ; } ) ; class Example extends Component { get todos ( ) { return store . getState ( ) . todos ; } @ action addTodo ( todo ) {
【文件预览】:
tracked-redux-master
----.ember-cli(280B)
----ember-cli-build.js(596B)
----config()
--------ember-try.js(1KB)
--------environment.js(90B)
----docs()
--------assets()
----.watchmanconfig(37B)
----package.json(3KB)
----.github()
--------workflows()
----tests()
--------test-helper.js(228B)
--------index.html(1KB)
--------unit()
--------dummy()
--------integration()
--------helpers()
----RELEASE.md(2KB)
----testem.js(589B)
----CONTRIBUTING.md(651B)
----src()
---------private()
--------index.ts(89B)
----.eslintrc.js(1KB)
----.template-lintrc.js(58B)
----tsconfig.json(279B)
----LICENSE.md(1KB)
----.gitignore(377B)
----CHANGELOG.md(1KB)
----.dependabot()
--------config.yml(306B)
----README.md(3KB)
----yarn.lock(536KB)
----.eslintignore(248B)
----ember-addon-main.js(72B)
----.editorconfig(367B)

网友评论