文件名称:react-state:本地化React状态组件
文件大小:6KB
文件格式:ZIP
更新时间:2024-06-18 17:46:12
JavaScript
React状态 React 渲染函数中的本地化状态。 npm install react-state --save class Counter { render ( ) { return < State xss=removed> { ( val , set ) => < div xss=removed> set ( val + 1 ) } > clicked { val } times < / div > } < / State > ; } } React . render ( < Counter> , el ) ; // just works. // there's also a functional form to mask the reacty bits class
【文件预览】:
react-state-master
----.eslintrc(209B)
----sandbox.js(482B)
----.babelrc(16B)
----index.js(3KB)
----package.json(753B)
----tests.js(2KB)
----.gitignore(181B)
----karma.conf.js(2KB)
----README.md(941B)
----src.js(598B)