@act/hmr 中文文档教程
Act hot module replacement [hmr]
Act hmr hello world:
import main from '@act/hmr'
const view = (val) =>
['button', { click: { add: 1 } }, val]
const reducer = (state, { type, payload }) =>
type === 'add' ? state + payload : state
main(view, { reducer, module })
这是一个完整的看板示例。 这里有一段视频,对其进行了更详细的解释。
More
此模块的文档是 Act 的一部分 文档。
A simple reactive front-end framework
Act hot module replacement [hmr]
Act hmr hello world:
import main from '@act/hmr'
const view = (val) =>
['button', { click: { add: 1 } }, val]
const reducer = (state, { type, payload }) =>
type === 'add' ? state + payload : state
main(view, { reducer, module })
Here's a full kanban board example. And here's a video explaining it in more detail.
More
The documentation for this module is part of Act's docs.