Skip to content
On this page

React 全家桶

更新18

pnpm update react react-dom
// Before
import { render } from 'react-dom';
const container = document.getElementById('app');
render(<App tab="home" />, container);

// After
import { createRoot } from 'react-dom/client';
const container = document.getElementById('app');
const root = createRoot(container); // createRoot(container!) if you use TypeScript
root.render(<App tab="home" />);

数据流

https://npmtrends.com/mobx-vs-recoil-vs-redux-vs-zustand

https://redux-toolkit.js.org/

  1. redux + redux-kit
  2. mobx
  3. redoil
  4. zustand

路由

react-router-dom

https://github.com/remix-run/react-router