Download dev.to-clone/src/store/post/postData.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 772 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/dev.to-clone/src/store/post/postData.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/dev.to-clone/src/store/post/postData.js
-
curl -L -o postData.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/dev.to-clone/src/store/post/postData.js
772 Bytes
| import { createSlice } from '@reduxjs/toolkit'; | |
| const initialState = { | |
| cvImg: '', | |
| title: '', | |
| tags: [], | |
| MDEValue: '', | |
| }; | |
| const PostDataSlice = createSlice({ | |
| name: 'postData', | |
| initialState, | |
| reducers: { | |
| setTitleToStore: (state, action) => { | |
| state.title = action.payload; | |
| }, | |
| setCvImgToStore: (state, action) => { | |
| state.cvImg = action.payload; | |
| }, | |
| setTagsToStore: (state, action) => { | |
| state.tags = action.payload; | |
| }, | |
| setMDEValueToStore: (state, action) => { | |
| state.MDEValue = action.payload; | |
| }, | |
| }, | |
| }); | |
| export const { | |
| setCvImgToStore, | |
| setTitleToStore, | |
| setTagsToStore, | |
| setMDEValueToStore, | |
| } = PostDataSlice.actions; | |
| export default PostDataSlice.reducer; | |