![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/UWJXU/btqMDy4DP9S/LxSSwwcSKmR4vRDKIYQVs0/img.png)
✏️React를 경험해보자 6탄 Redux의 흐름부터 파악을 해야 할 것 같다. 저번에 createStoreWithMiddleware 함수를 통해 store를 생성했고, reducer라는 인자를 넘겨주었다. // user_reducer.js import { LOGIN_USER } from "../_actions/types"; export default function (state = {}, action) { switch (action.type) { case LOGIN_USER: return { ...state, loginSuccess: action.payload }; default: return state; } } // reducers/index.js import { combineReducers } fr..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/9IKYx/btqMxpelnw7/F0y0R7iKjy2nx2A7Csjc2K/img.png)
✏️React를 경험해보자 5탄 4탄에서 Provider를 통해 App에서 Store 접근을 할 수 있게 만들었다. 5탄에서는 리덕스를 이용해서 로그인 기능을 만들어보려고 한다. import React, { useState } from "react"; import { useDispatch } from "react-redux"; import { loginUser } from "../_actions/user_action"; function LoginPage(props) { const dispatch = useDispatch(); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const onEmailHa..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/b6hu8t/btqMkoaABnL/f6H6v5rdz1v1zsZZfCagO0/img.png)
✏️React를 경험해보자 4탄 3편에서는 Proxy 설정을 통해 Cors 문제를 해결했다. 4편에서는 node.js (server)와 react (client) 서버를 동시에 실행할 수 있는 Concurrently, 상태관리 라이브러리인 Redux를 적용해볼까 한다. - 서버와 클라이언트를 동시에 실행할 수 있는 Concurrently Backend + Frontend를 같이 사용하는 프로젝트를 하다보면, 둘 다 서버를 켜줘야 한다. 매번 귀찮게 두번 명령어를 입력할 필요 없이, 한번의 명령어로 두개의 서버를 켜주는 착한 라이브러리이다. www.npmjs.com/package/concurrently concurrently Run commands concurrently www.npmjs.com npm i..
- Total
- Today
- Yesterday
- Closure
- react
- Front
- composition
- Redux
- pagination
- react-query
- vue.js
- JS
- 타입스크립트
- 호이스팅
- backend
- Cypress
- CORS
- react query
- Core Components
- 퍼블리셔
- vuetify
- pinia
- three.js
- 포트폴리오
- Store
- 자바스크립트
- NUXT
- e2e
- vue3
- frontend
- vuex
- react native
- vue
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |