21 个版本
| 1.0.0-alpha.23 | 2022年2月22日 |
|---|---|
| 1.0.0-alpha.22 | 2022年2月12日 |
| 1.0.0-alpha.20 | 2022年1月26日 |
| 1.0.0-alpha.17 | 2021年11月24日 |
#810 in WebAssembly
在 3 个 crate 中使用(通过 react-rs)
19KB
389 行
react-sys
Rust 对 React 的绑定。
安装
Cargo.toml
react-sys = "1.0.0-alpha.11"
尽管版本号为 1.x-alpha,但此 crate 仍未准备好用于生产,且处于高度开发中。此 crate 被 frender 使用,它提供了一种友好且安全的 API,用于在 Rust 中使用 React。
待办事项
-
Hooks
-
React.useState -
React.useRef -
React.useEffectunsafe -
React.useContext -
useLayoutEffect -
我们能否在 Rust 中实现以下 Hooks?
-
React.useMemo -
React.useCallback也许我们应该在 Rust 中实现一个
use_closurehook。
-
-
我们是否需要在 Rust 中实现以下 Hooks?
-
React.useReducer -
React.useImperativeHandle -
useDebugValue
-
-
-
ErrorBoundary -
React.memo -
Component- html
- 带有 Hooks 的函数组件
-
Element-
React.createElement -
React.Element之间的 js 和 rust wasm 转换 - 类似
jsx的语法来创建元素
-
依赖项
~6.5–8.5MB
~169K SLoC