扫一扫分享
一个快速和轻量的虚拟dom替代方案也适用于Node.js和NativeScript。如果你也喜欢react hooks机制,你想通过hyperhtml或HyperHTMLElement来组合它们,试试hyperHTML吧。
无论您使用ESM还是CommonJS,都可以使用hypermorphic 在客户端和服务器上加载相同的功能。
// ESM example (assuming bundlers/ESM loaders in place)
import {bind, wire} from 'hypermorphic';
// CommonJS example
const {bind, wire} = require('hypermorphic');
手机预览