Merge branch 'master' of https://gitee.com/chenxuanxyz/react
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
/*
|
||||
* @Author: chenxuan
|
||||
* @Date: 2022-06-21 23:29:37
|
||||
* @LastEditTime: 2022-07-31 22:29:40
|
||||
* @LastEditTime: 2022-08-03 00:08:46
|
||||
* @LastEditors: chenxuan
|
||||
*/
|
||||
|
||||
import Count from "./components/count/index"
|
||||
import Person from './components/person/index'
|
||||
import store from './redux/store'
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<Count store={store}></Count>
|
||||
<Count></Count>
|
||||
<Person></Person>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* @LastEditTime: 2022-08-02 16:59:08
|
||||
* @LastEditors: chenxuan
|
||||
*/
|
||||
import Rreact,{Component} from 'react'
|
||||
import {Component} from 'react'
|
||||
import {nanoid} from 'nanoid'
|
||||
import person from './style.module.css'
|
||||
import createPerson from '../../redux/action/person'
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* @Author: chenxuan
|
||||
* @Date: 2022-07-31 23:04:08
|
||||
* @LastEditTime: 2022-08-02 00:12:32
|
||||
* @LastEditTime: 2022-08-03 00:00:43
|
||||
* @LastEditors: chenxuan
|
||||
*/
|
||||
import {ADDPERSON} from '../const'
|
||||
export default function addPerson(state=[{name:"陈轩",age:18,id:1}],action){
|
||||
const {type,data}=action
|
||||
if(type==ADDPERSON){
|
||||
if(type===ADDPERSON){
|
||||
return [...state,data]
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user