Download dev.to-clone/src/store/user/profileData.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 720 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/dev.to-clone/src/store/user/profileData.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/dev.to-clone/src/store/user/profileData.js
-
curl -L -o profileData.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/dev.to-clone/src/store/user/profileData.js
720 Bytes
| import { createSlice } from '@reduxjs/toolkit'; | |
| const initialState = { | |
| profileData: null, | |
| profileDataLoading: false, | |
| profileDataErr: false, | |
| }; | |
| const profileDataSlice = createSlice({ | |
| name: 'profileData', | |
| initialState, | |
| reducers: { | |
| setProfileData: (state, action) => { | |
| state.profileData = action.payload; | |
| }, | |
| setProfileDataLoading: (state, action) => { | |
| state.profileDataLoading = action.payload; | |
| }, | |
| setProfileDataErr: (state, action) => { | |
| state.profileDataErr = action.payload; | |
| }, | |
| }, | |
| }); | |
| export const { setProfileData, setProfileDataLoading, setProfileDataErr } = | |
| profileDataSlice.actions; | |
| export default profileDataSlice.reducer; | |