{"id":27123871,"url":"https://github.com/devsandeepsharma/redux-learning","last_synced_at":"2026-04-18T01:02:49.121Z","repository":{"id":285529101,"uuid":"958381768","full_name":"devsandeepsharma/redux-learning","owner":"devsandeepsharma","description":"Explored how to configure and use Redux Toolkit for state management in React 💕💕","archived":false,"fork":false,"pushed_at":"2025-04-18T11:00:13.000Z","size":526,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T20:49:16.375Z","etag":null,"topics":["reactjs","redux","redux-toolkit"],"latest_commit_sha":null,"homepage":"https://redux-learning-tau.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devsandeepsharma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-01T05:31:21.000Z","updated_at":"2025-04-18T11:01:56.000Z","dependencies_parsed_at":"2025-04-01T09:22:40.192Z","dependency_job_id":"dcdb86c6-2980-4458-a992-cdc523797a5d","html_url":"https://github.com/devsandeepsharma/redux-learning","commit_stats":null,"previous_names":["devsandeepsharma/redux-learning"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devsandeepsharma/redux-learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsandeepsharma%2Fredux-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsandeepsharma%2Fredux-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsandeepsharma%2Fredux-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsandeepsharma%2Fredux-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsandeepsharma","download_url":"https://codeload.github.com/devsandeepsharma/redux-learning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsandeepsharma%2Fredux-learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31952208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["reactjs","redux","redux-toolkit"],"created_at":"2025-04-07T13:18:54.126Z","updated_at":"2026-04-18T01:02:49.030Z","avatar_url":"https://github.com/devsandeepsharma.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 Redux Learning Project\n\nThis project is built to help understand the fundamentals of **Redux Toolkit** in a React application. It includes basic features like user authentication and a counter, showing how to manage global state effectively with modern Redux practices.\n\n---\n\n## 📖 What I Learned\n\n✅ How to set up Redux Toolkit  \n✅ Creating slices with actions and reducers  \n✅ Connecting store to React using `\u003cProvider\u003e`  \n✅ Reading state with `useSelector`  \n✅ Dispatching actions with `useDispatch`  \n✅ Structuring app logic cleanly into components  \n\nThe app basically checks if a user is \"logged in\" (mocked).  \nIf yes → shows profile + counter.  \nIf no → shows login screen.\n\n---\n\n## 🔥 Quick Guide: Redux Toolkit Setup in React\n\n### 1. Install Redux Toolkit and React-Redux\n\n```bash\nnpm install @reduxjs/toolkit react-redux\n```\n\n### 2. Create a Slice\n\n```js\nimport { createSlice } from \"@reduxjs/toolkit\";\n\nconst slice = createSlice({\n  name: \"yourSliceName\",\n  initialState: {},\n  reducers: {\n    yourAction(state, action) {\n      // update state here\n    },\n  },\n});\n\nexport const yourActions = slice.actions;\nexport default slice.reducer;\n```\n\n### 3. Configure the Store\n\n```js\nimport { configureStore } from \"@reduxjs/toolkit\";\nimport yourReducer from \"./yourSlice\";\n\nconst store = configureStore({\n  reducer: { yourKey: yourReducer },\n});\n\nexport default store;\n```\n\n### 4. Wrap App with Provider\n\n```js\nimport { Provider } from \"react-redux\";\nimport store from \"./store\";\n\n\u003cProvider store={store}\u003e\n  \u003cApp /\u003e\n\u003c/Provider\u003e\n```\n\n### 5. Use Redux in Components\n\n```js\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { yourActions } from \"./yourSlice\";\n\nconst Component = () =\u003e {\n  const data = useSelector(state =\u003e state.yourKey.someData);\n  const dispatch = useDispatch();\n\n  return (\n    \u003c\u003e\n      \u003cbutton onClick={() =\u003e dispatch(yourActions.yourAction())}\u003eClick\u003c/button\u003e\n    \u003c/\u003e\n  );\n};\n```\n\n## Preview\n\n\u003cimg src=\"./public/1.png\" /\u003e\n\u003cimg src=\"./public/2.png\" /\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsandeepsharma%2Fredux-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsandeepsharma%2Fredux-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsandeepsharma%2Fredux-learning/lists"}