React simple server rendering example (including the use of redux, redux-thunk)

1. package.json { “name”: “react-server”, “version”: “1.0.0”, “description”: “”, “main”: “index.js”, “scripts”: { “dev”: “npm-run-all –parallel dev:**”, “dev:build:client”: “webpack –config config/webpack.client.js –watch”, “dev:build:server”: “webpack –config config/webpack.server.js –watch”, “dev:start”: “nodemon –watch dist –exec node “./dist/bundle.js”” }, “keywords”: [], “author”: “”, “license”: “ISC”, “devDependencies”: { “@babel/core”: “^7.0.0”, “@babel/plugin-proposal-private-property-in-object”: “^7.21.11”, “@babel/preset-env”: “^7.22.20”, “@babel/preset-react”: “^7.22.15”, “@babel/preset-stage-0”: “^7.8.3”, “@babel/preset-typescript”: “^7.23.0”, […]

The state management tool 1 of react 09 uses redux+ react-thunk to realize cross-component state management and asynchronous operation

Table of Contents The state management tool 1 of react 09 uses redux + react-thunk to realize cross-component state management and asynchronous operation store/index.js The entry file of the store index.js is introduced in the project entry file store / actionType.js defines the unique identifier of the action store/reducers/index.js store/actions/form.js store/reducers/form.js store/actions/list.js store/reducers/list.js Use the […]

Redux, react-redux, redux-thunk, redux-saga, @reduxjs/toolkit understanding and use, differences and usage scenarios?

redux, react-redux, redux-thunk, redux-saga, @reduxjs/toolkit understanding and use, the difference between redux and react-redux, the difference between @reduxjs/toolkit and react-redux, redux-saga and @redux -thunk difference and usage scenarios? 1. redux understand use 2. react-redux understand use 3. Talk about the difference between redux and react-redux: 4. Tell me about your understanding of @reduxjs/toolkit? What is […]