일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- useState
- error
- API
- middleware
- tailwindcss
- concept
- Ethereum
- REACT
- typeScript
- CSS
- 삶
- HTML
- 기준
- node.js
- graphQL
- CLASS
- blockchain
- built in object
- Props
- bitcoin
- solidity
- SSR
- JavaScript
- express.js
- Redux
- hardhat
- evm
- nextJS
- web
- Interface
- Today
- Total
목록전체 글 (369)
ReasonJun
persistReducer and persistStore are two functions provided by the Redux Persist library to persist Redux state to persistent storage. persistReducer takes a configuration object and a reducer as input and returns a new reducer that persists the state to the configured storage. The configuration object specifies the following: The key to use to store the state in the storage. The storage engine t..
abort is a function in Redux Toolkit that can be used to cancel an asynchronous action. Asynchronous actions are actions that perform some kind of external operation, such as fetching data from an API. abort takes two arguments: action: The action to be aborted. error: An optional error object to be passed to the rejected action. The action argument is the action that you want to cancel. The err..
createAsyncThunk is a function in Redux Toolkit that helps you write asynchronous actions in Redux. Asynchronous actions are actions that perform some kind of external operation, such as fetching data from an API. createAsyncThunk takes two arguments: actionName: The name of the action. payloadCreator: A function that takes the action's payload as an argument and returns a promise. The payloadCr..
createAction() The createAction() function in Redux Toolkit is a helper function that creates an action creator function. An action creator function is a function that returns an action object. The createAction() function takes two arguments: the action type and an optional prepareCallback function. The action type is a string that uniquely identifies the action. The prepareCallback function is ..
The configureStore() function in Redux Toolkit is a simplified version of the createStore() function in the original Redux library. It takes care of setting up the store with the middleware you need, and it also includes redux-thunk by default. Here is the syntax for using configureStore(): import { configureStore } from '@reduxjs/toolkit'; const store = configureStore({ reducer: rootReducer, })..
Redux Toolkit is a set of tools that helps simplify Redux development. It provides a number of utilities that make it easier to create and manage Redux stores, reducers, and actions. Some of the features of Redux Toolkit include: Simplified store configuration: Redux Toolkit provides a function called configureStore() that makes it easy to configure a Redux store. This function takes care of set..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/xD7Kq/btsrB3iMHei/gisb3huCdCnX5XEHAulMpK/img.png)
middleware is a way to extend Redux with custom functionality. It is a function that sits between the action being dispatched and the action reaching the reducers. It allows you to intercept actions and do things like logging, routing, or asynchronous actions. Middleware is a composable function, which means that you can combine multiple middleware together. This makes it easy to add new functio..
Provider is a React component that makes the Redux store available to all of its child components. It is used to connect the Redux store to the React component tree. The syntax for using Provider is as follows: import { Provider } from 'react-redux'; const App = () => { const store = createStore(reducer); return ( ); }; In this example, the Provider component is used to make the store variable a..
CombineReducers is a Redux helper function that takes an object of reducers as input and returns a single reducer that combines the functionality of all the reducers in the object. This is useful when your application has a complex state that is managed by multiple reducers. The syntax for using CombineReducers is as follows: const rootReducer = combineReducers({ counter: counterReducer, todos: ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cGz8hm/btsrCx4YPjo/KVwxRqfgqxWuAx3mVqofnK/img.gif)
Redux data flow is a unidirectional data flow architecture that ensures that data can only flow from the actions to the reducers, and then to the store. This makes it easier to reason about the state of the application and to track changes over time. The data flow in Redux is as follows: The user interacts with the application, which triggers a change in the state. The component that handles the..