# react-sys
[](https://crates.io/crates/react-sys)
[](https://docs.rs/react-sys)
[](https://github.com/frender-rs/react-sys/blob/main/LICENSE)
[](https://github.com/frender-rs/react-sys/stargazers)
Rust bindings for `React`.
# Install
`Cargo.toml`
```toml
react-sys = "1.0.0-alpha.9"
```
Though the version is at `1.x-alpha`,
this crate is NOT ready for production
and under heavy development.
This crate is used by [`frender`](https://github.com/frender-rs/frender), which provides a friendly and safe api to use React in rust.
# TODO
- Hooks
- [x] `React.useState`
- [x] `React.useRef`
- [x] `React.useEffect` `unsafe`
- [ ] `React.useContext`
- [ ] `useLayoutEffect`
- [ ] Can we implement the following hooks in rust ?
- [ ] `React.useMemo`
- [ ] `React.useCallback`
Maybe we should implement a `use_closure` hook in rust.
- [ ] Do we need the following hooks in rust ?
- [ ] `React.useReducer`
- [ ] `React.useImperativeHandle`
- [ ] `useDebugValue`
- [ ] `ErrorBoundary`
- [ ] `React.memo`
- [ ] `Component`
- [ ] html
- [ ] functional component with hooks
- [ ] `Element`
- [x] `React.createElement`
- [ ] `React.Element` cast between js and rust wasm
- [ ] `jsx` like syntax to create element