文件名称:播种机:ReactReact UI工具链和JSX替代品
文件大小:566KB
文件格式:ZIP
更新时间:2024-02-20 20:09:12
react babel eslint jsx babel-plugin
播种机 指南 最小的例子 import sow from 'sowing-machine' import { useState } from 'react' // wrap the component with 'sow' const Counter = sow ( ( ) => { const [ count , setCount ] = useState ( 0 ) const decrement = ( ) => setCount ( count - 1 ) const increment = ( ) => setCount ( count + 1 ) // express your UI and its embedded logic return div ( { className : 'wrapper' } ) ( h1 ( 'current count: ' , count ) , div ( { className : 'controls' } ) ( button ( { onClick : decrement } ) `
【文件预览】:
sowing-machine-master
----.eslintrc(625B)
----yarn.lock(551KB)
----.prettierignore(21B)
----packages()
--------runtime()
--------babel-plugin()
--------eslint-plugin()
--------babel-tests()
--------babel-macro()
--------eslint-config()
----examples()
--------babel-macro-usage()
--------cra-js()
----.travis.yml(202B)
----.prettierrc(203B)
----lerna.json(123B)
----README.md(12KB)
----.gitignore(354B)
----.eslintignore(81B)
----package.json(1KB)