<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ravi Sharma</title>
    <description>The latest articles on DEV Community by Ravi Sharma (@ravics09).</description>
    <link>https://dev.to/ravics09</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F318121%2Ff86d465e-353d-4659-a5fa-079853a2a2e4.png</url>
      <title>DEV Community: Ravi Sharma</title>
      <link>https://dev.to/ravics09</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ravics09"/>
    <language>en</language>
    <item>
      <title>Reset Final Cut Pro &amp; Logic Pro</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Fri, 18 Feb 2022 22:47:21 +0000</pubDate>
      <link>https://dev.to/ravics09/reset-final-cut-pro-logic-pro-h0p</link>
      <guid>https://dev.to/ravics09/reset-final-cut-pro-logic-pro-h0p</guid>
      <description>&lt;p&gt;have you paid for final cut pro and logic pro ? Use this trick...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/SD8GCIe36eI"&gt;https://youtu.be/SD8GCIe36eI&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This video made for educational purpose only.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>educational</category>
    </item>
    <item>
      <title>Big Collection of free resources for product developer and designers </title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Sun, 16 Jan 2022 21:42:14 +0000</pubDate>
      <link>https://dev.to/ravics09/big-collection-of-free-resources-for-product-developer-and-designers-2a9i</link>
      <guid>https://dev.to/ravics09/big-collection-of-free-resources-for-product-developer-and-designers-2a9i</guid>
      <description>&lt;h2&gt;
  
  
  DevAssist
&lt;/h2&gt;

&lt;p&gt;One of the best website found in 2022, where you will get all the free resources for you project development.&lt;/p&gt;

&lt;p&gt;100+ best website collection at one place.&lt;/p&gt;

&lt;p&gt;No need to google every-time just bookmark this one website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.devassist.in/"&gt;https://www.devassist.in/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>reactnative</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>onPress on react native view component</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Tue, 11 Jan 2022 21:13:49 +0000</pubDate>
      <link>https://dev.to/ravics09/onpress-on-react-native-view-component-3dfo</link>
      <guid>https://dev.to/ravics09/onpress-on-react-native-view-component-3dfo</guid>
      <description>&lt;p&gt;Hey Everyone, &lt;/p&gt;

&lt;p&gt;In react native Generally we are using  touchable opacity or other touchable component and wrap the View component as Child then we set click event on View but no need to use additional Touchable component to make view clickable, instead of it you can use other props that i have described in this video. you can use other View props like:&lt;br&gt;
onStartShouldSetResponder, onResponderRelease, onResponderGrant, onResponderMove or Pressable api of react native. &lt;/p&gt;

&lt;p&gt;You can watch this video in which i have explained how to use all of them to set onPress on react native view component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/YMyzKr3hoII"&gt;https://youtu.be/YMyzKr3hoII&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are interested to learn react native, ReactJS, NodeJS then subscribe my channel "JavaScript Centric" where, daily I am uploading interesting videos on different topics.&lt;/p&gt;

&lt;p&gt;Link:&lt;br&gt;
&lt;a href="https://www.youtube.com/c/JavaScriptCentric"&gt;https://www.youtube.com/c/JavaScriptCentric&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>reactnative</category>
      <category>javascript</category>
      <category>mobile</category>
    </item>
    <item>
      <title>React Native Folder Structure 2022</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Mon, 10 Jan 2022 15:08:41 +0000</pubDate>
      <link>https://dev.to/ravics09/react-native-folder-structure-2022-49nc</link>
      <guid>https://dev.to/ravics09/react-native-folder-structure-2022-49nc</guid>
      <description>&lt;p&gt;Here I am sharing my knowledge about react native folder structure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/LZXjVPn45A8"&gt;https://youtu.be/LZXjVPn45A8&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this video I explained 3 different folder structure for your react native project. I have shared the best react-native folder structure that I've been using for my react native projects.&lt;/p&gt;

&lt;p&gt;For react native projects and videos you can subscribe my youtube channel "JavaScript Centric"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/c/JavaScriptCentric"&gt;https://www.youtube.com/c/JavaScriptCentric&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>reactnative</category>
      <category>javascript</category>
      <category>mobile</category>
    </item>
    <item>
      <title>React Native Roadmap 2022</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Sun, 09 Jan 2022 15:49:50 +0000</pubDate>
      <link>https://dev.to/ravics09/react-native-roadmap-2022-119</link>
      <guid>https://dev.to/ravics09/react-native-roadmap-2022-119</guid>
      <description>&lt;p&gt;Hell everyone, &lt;br&gt;
If you are interested to learn mobile development using react native then you can watch my upcoming videos on react native.&lt;/p&gt;

&lt;p&gt;I am sharing react native roadmap 2022 where I have explained topics that I will cover in my upcoming videos. So please watch the given video and if interested then subscribe my channel. I will cover all the topics from basic to advance. Also we will build different react native project and deploy on google play store..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/-_3kT_OV6Vs"&gt;https://youtu.be/-_3kT_OV6Vs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Link of my youtube channel “JavaScript Centric”-&lt;br&gt;
&lt;a href="https://www.youtube.com/c/JavaScriptCentric"&gt;https://www.youtube.com/c/JavaScriptCentric&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>reactnative</category>
      <category>mobile</category>
    </item>
    <item>
      <title>JavaScript Roadmap 2022</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Thu, 06 Jan 2022 14:56:02 +0000</pubDate>
      <link>https://dev.to/ravics09/javascript-roadmap-2022-24g9</link>
      <guid>https://dev.to/ravics09/javascript-roadmap-2022-24g9</guid>
      <description>&lt;p&gt;If you want to start learning javascript in 2022, then you can follow this javascript roadmap. I have added all important topics that you can cover.&lt;br&gt;
JavaScript Learning Path 2022..&lt;/p&gt;

&lt;h2&gt;
  
  
  Link
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/2PVFdxmz678"&gt;https://youtu.be/2PVFdxmz678&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>react</category>
    </item>
    <item>
      <title>Basics of Redux Toolkit</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Wed, 05 Jan 2022 16:29:57 +0000</pubDate>
      <link>https://dev.to/ravics09/basics-of-redux-toolkit-5h0i</link>
      <guid>https://dev.to/ravics09/basics-of-redux-toolkit-5h0i</guid>
      <description>&lt;h1&gt;
  
  
  What is Redux ?
&lt;/h1&gt;

&lt;p&gt;Redux is an open-source JavaScript library for managing application state. It is most commonly used with libraries such as React or Angular for building user interfaces&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Redux Toolkit ?
&lt;/h1&gt;

&lt;p&gt;Redux Toolkit (RTK), previously known as Redux Starter Kit, provides some options to configure the global store and create both actions and reducers in a more streamlined manner. Redux toolkit includes all the tools, you want for a Redux application.&lt;/p&gt;

&lt;p&gt;By using this, you can write all the code you need for your Redux store in a single file, including actions and reducers. Using this you can make your code more readable.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why Redux Toolkit 🤷‍♂️?
&lt;/h1&gt;

&lt;p&gt;Redux Toolkit is mainly created to solve the three major issues with Redux:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Configuring a Redux store is too complicated:&lt;/strong&gt; Redux Toolkit offers configureStore function to simplify configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Need to add lots of packages:&lt;/strong&gt; Redux Toolkit reduces the need to add multiple packages to build large scale application&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Too much boilerplate code:&lt;/strong&gt; Redux requires too much boilerplate code which makes it cumbersome to write efficient and clean code. Redux Toolkit helps to reduce boilerplate code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Redux Toolkit comes pre-bundled with the below features:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;immer.js =&amp;gt; a library/tool to handle immutability in stores.&lt;/li&gt;
&lt;li&gt;redux =&amp;gt; For state management&lt;/li&gt;
&lt;li&gt;redux-thunk =&amp;gt;For async tasks&lt;/li&gt;
&lt;li&gt;reselect =&amp;gt; For selecting a slice out of global store&lt;/li&gt;
&lt;li&gt;automatic support for Redux Dev-tools Extension&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Start with Redux Toolkit
&lt;/h1&gt;

&lt;p&gt;You will need to include Redux as well as the react-redux binding package for it to work properly with React. You’ll also need the Redux Toolkit itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i redux react-redux @reduxjs/toolkit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Usually, you would also need the Redux DevTools extensions in order to debug your store mutations correctly; but since you’re using RTK, those are already included.&lt;/p&gt;

&lt;h1&gt;
  
  
  Important Terms Used In Redux Toolkit
&lt;/h1&gt;

&lt;p&gt;1.Store&lt;br&gt;
2.createSlice&lt;br&gt;
3.name&lt;br&gt;
4.initialState&lt;br&gt;
5.reducers&lt;br&gt;
6.extraReducers&lt;br&gt;
7.createReducer&lt;br&gt;
8.createAction&lt;br&gt;
9.createAsyncThunk&lt;br&gt;
10.createEntityAdapter&lt;br&gt;
11.createSelector&lt;/p&gt;
&lt;h1&gt;
  
  
  Creating store
&lt;/h1&gt;

&lt;p&gt;In traditional Redux, you had to call createStore using the main reducer as a parameter. The way to do it with RTK is to call &lt;strong&gt;configureStore&lt;/strong&gt;, which allows you to do the same.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { configureStore } from "@reduxjs/toolkit";
import { combineReducers } from "redux";
import logger from 'redux-logger'

import usersReducer from "./slices/userSlice";
import postsReducer from "./slices/postSlice";

const rootReducer = combineReducers({
  users: usersReducer,
  posts: postsReducer
});

const preloadedState = {
  postsData: [
    {
      text: 'JavaScript Centric',
      completed: true,
    },
    {
      text: 'Lucky Gamer',
      completed: false,
    },
  ]
}

const store = configureStore({
  reducer: rootReducer,
  middleware: (getDefaultMiddleware) =&amp;gt; getDefaultMiddleware().concat(logger),
  devTools: process.env.NODE_ENV !== "production",
  preloadedState,
  enhancers: [reduxBatch],
});

export default store;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here configureStore has five parameters(reducer, middleware, devtools, preloadedState, enhancers).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;reducer&lt;/strong&gt; is a single function, it will be directly used as the root reducer for the store. If it is an object of slice reducers, like {users : usersReducer, posts : postsReducer}, &lt;strong&gt;configureStore&lt;/strong&gt; will automatically create the root reducer by passing this object to the Redux &lt;strong&gt;combineReducers&lt;/strong&gt; utility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;middleware&lt;/strong&gt; is an optional array of Redux middleware functions. If this option is provided, it should contain all the middleware functions you want added to the store. configureStore will automatically pass those to &lt;strong&gt;applyMiddleware&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;devTools&lt;/strong&gt; has default boolean value of true and will be used to indicate whether configureStore should automatically enable support for the Redux DevTools browser extension. If it is an object, then the DevTools Extension will be enabled, and the options object will be passed to composeWithDevtools(). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;preloadedState&lt;/strong&gt; is an optional initial state value to be passed to the Redux createStore function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;enhancers&lt;/strong&gt; is an optional array of Redux store enhancers, or a callback function to customize the array of enhancers. Example: enhancers: [offline] will result in a final setup of [applyMiddleware, offline, devToolsExtension].&lt;/p&gt;

&lt;h1&gt;
  
  
  createSlice:
&lt;/h1&gt;

&lt;p&gt;createSlice is a higher order function that accepts an &lt;strong&gt;initial state&lt;/strong&gt;, an &lt;strong&gt;Object full of reducer functions&lt;/strong&gt;, and a &lt;strong&gt;slice name&lt;/strong&gt;, and returns a single reducer along with the action creators for that reducer. (Automatically generates action creators and action types that correspond to the reducers and state).&lt;/p&gt;

&lt;p&gt;We can Import the createSlice method from the redux-toolkit library.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { createSlice } from '@reduxjs/toolkit'
const initialState: {
        users: []
    }

const userSlice = createSlice({
    name: 'user',
    initialState,
    reducers: {
        getUsers: (state, action) =&amp;gt; {
            state.users = action.payload;
        }

    },
});

export const { getUsers } = userSlice.actions;
export default userSlice.reducer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;createSlice looks at all the functions that are defined in the reducers field and for every case generates an action creator that uses the name of the reducer as the action type itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;initialState&lt;/strong&gt; value for this slice of state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;name&lt;/strong&gt; a string name for this slice of state. Generated action type constants will use this as a prefix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;reducers&lt;/strong&gt; is an object containing Redux "case reducer" functions. The keys in the object will be used to generate string action type constants, and these will show up in the Redux DevTools Extension when they are dispatched. &lt;/p&gt;

&lt;h1&gt;
  
  
  createAction
&lt;/h1&gt;

&lt;p&gt;is a simple helper function that accepts an action type (string) and returns an action creator. The usual way to define an action in Redux is to separately declare an action type constant and an action creator function for constructing actions of that type.&lt;/p&gt;

&lt;h1&gt;
  
  
  createReducer
&lt;/h1&gt;

&lt;p&gt;is a function that accepts an object where the keys are the action type and the values are the reducer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { createAction, createReducer } from '@reduxjs/toolkit'

const increment = createAction('counter/increment')
const decrement = createAction('counter/decrement')

const counterReducer = createReducer(0, (builder) =&amp;gt; {
  builder.addCase(increment, (state, action) =&amp;gt; state + action.payload)
  builder.addCase(decrement, (state, action) =&amp;gt; state - action.payload)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It supports two different forms of defining case reducers to handle actions: a &lt;strong&gt;"builder callback"&lt;/strong&gt; notation and a &lt;strong&gt;"map object"&lt;/strong&gt; notation. Both are equivalent, but the "builder callback" notation is preferred.&lt;/p&gt;

&lt;p&gt;That builder provides &lt;strong&gt;addCase, addMatcher and addDefaultCase&lt;/strong&gt; functions that may be called to define what actions this reducer will handle.&lt;/p&gt;

&lt;p&gt;A callback that receives a builder object to define case reducers via calls to&lt;br&gt;
&lt;code&gt;builder.addCase(actionCreatorOrType, reducer).&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;All calls to builder.addCase must come before any calls to builder.addMatcher or builder.addDefaultCase.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Redux Toolkit React Counter App</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Fri, 19 Nov 2021 03:15:45 +0000</pubDate>
      <link>https://dev.to/ravics09/redux-toolkit-react-counter-app-nmm</link>
      <guid>https://dev.to/ravics09/redux-toolkit-react-counter-app-nmm</guid>
      <description>&lt;p&gt;Hi, I'm Ravi. I'm an JavaScript Developer by profession and a Youtuber also, subscribe my channel &lt;a href="https://www.youtube.com/channel/UC9MmyicGIveu0AId8OFAOmQ" rel="noopener noreferrer"&gt;JavaScript Centric&lt;/a&gt; If you are one of the lover of JavaScript.&lt;/p&gt;

&lt;p&gt;In this post I will share the basic example of a Counter App implemented using react and redux toolkit.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why use Redux Toolkit? 🤷‍♂️
&lt;/h1&gt;

&lt;p&gt;Redux toolkit includes all the functions or "tools", you want for a Redux application. At the end of the day, less code and faster setups of Redux in every scenario.&lt;/p&gt;

&lt;p&gt;Here's what the Official docs said :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;These tools should be beneficial to all Redux users. Whether you're a brand new Redux user setting up your first project, or an experienced user who wants to simplify an existing application, Redux Toolkit can help you make your Redux code better.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Create a react app
&lt;/h1&gt;

&lt;p&gt;Create-react-app gives you a basic React app so don't have to setup React yourself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app readuxtoolkit_app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we need to add react-redux and Redux Toolkit to this app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --save react-redux @reduxjs/toolkit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can install react-bootstrap also:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --save react-bootstrap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Folder Structure
&lt;/h1&gt;

&lt;p&gt;We will be following this folder structure. Create two folders app and features inside src folder. Inside app folder create file store.js and inside features folder create two other folders coin and counter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Felpna4fvttjjoq6h2ssi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Felpna4fvttjjoq6h2ssi.png" alt="Basic React , Redux Toolkit Directory Structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Steps To Follow
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Create a Redux Store&lt;/li&gt;
&lt;li&gt;Provide the Redux Store to React Main App.js&lt;/li&gt;
&lt;li&gt;Create a Redux State Slice&lt;/li&gt;
&lt;li&gt;Add Slice Reducers to the Store&lt;/li&gt;
&lt;li&gt;Use Redux State and Actions in React Component&lt;/li&gt;
&lt;li&gt;To use redux state in other component use useSelector hook from react-redux&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;1.First Step is to configure our Store, now this is where you'll see the magic of redux toolkit! Now your redux store src/app/store.js will contains&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { configureStore } from '@reduxjs/toolkit';

export const store = configureStore({
  reducer: {

  },
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here configureStore({}) wraps createStore to provide simplified configuration options and good defaults. It can automatically combine your slice reducers, adds whatever Redux middleware you supply, includes redux-thunk by default, and enables use of the Redux DevTools Extension.&lt;/p&gt;

&lt;p&gt;2.Now we need to connect our store to our app or just wrap it with Redux. Import store.js and Provider from react-redux into src/index.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { store } from "./app/store";
import { Provider } from "react-redux";

ReactDOM.render(
    &amp;lt;React.StrictMode&amp;gt;
        &amp;lt;Provider store={store}&amp;gt;
            &amp;lt;App /&amp;gt;
        &amp;lt;/Provider&amp;gt;
    &amp;lt;/React.StrictMode&amp;gt;,
    document.getElementById("root")
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now start your application with npm start and open up Redux DevTools, you should see @&lt;a class="mentioned-user" href="https://dev.to/init"&gt;@init&lt;/a&gt;. Congrats you have setup Redux with React!! 🥳️&lt;/p&gt;

&lt;p&gt;3.Third Step is to create a counterSlice.js file inside features/counter folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { createSlice } from '@reduxjs/toolkit'

const initialStateValues = {
  coin: 0,
}

export const counterSlice = createSlice({
  name: 'counter',
  initialState: initialStateValues,
  reducers: {
    increment: (state) =&amp;gt; {
      state.coin += 1
    },
    decrement: (state) =&amp;gt; {
      state.coin -= 1
    },
    incrementByAmount: (state, action) =&amp;gt; {
      state.coin += action.payload
    },
    decrementByAmount: (state, action) =&amp;gt; {
      state.coin -=action.payload
    }
  },
})

// Action creators are generated for each case reducer function
export const { increment, decrement, incrementByAmount, decrementByAmount } = counterSlice.actions

export default counterSlice.reducer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically createSlice accepts an object of reducer functions, a slice name( in our case slice name is 'counter') and an initialState(here initialStateValues that contains coin) and automatically generates a slice reducer with corresponding action creators and action types.&lt;/p&gt;

&lt;p&gt;4.Fourth Step is to Add Slice Reducers to the Store. So update store.js will look like below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { configureStore } from '@reduxjs/toolkit';
import counterReducer from './../features/counter/counterSlice';

export const store = configureStore({
  reducer: {
      counter: counterReducer
  },
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In case if you are using other reduces than you have to use combineReducers from redux as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { configureStore } from "@reduxjs/toolkit";
import counterReducer1 from "./../features/counter/counterSlice1";
import counterReducer2 from "./../features/counter/counterSlice2";

import { combineReducers } from "redux";

const reducer = combineReducers({
  // put all your reducers here!
  counterReducer1,
  counterReducer2,
});

export const store = configureStore({
  reducer,
});

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.To use actions in other component we have to use useDispatch() provided by "react-redux" and used to dispatch our actions like&lt;br&gt;&lt;br&gt;
&lt;code&gt;const dispatch = useDispatch();&lt;/code&gt;&lt;br&gt;
now call dispatch action by passing action name inside it.&lt;br&gt;
In features/counter/Counter.js we are using different actions like (increment, decrement, incrementByAmount, decrementByAmount).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useDispatch } from "react-redux";
import {
  increment,
  decrement,
  incrementByAmount,
  decrementByAmount,
} from "./counterSlice";
import Button from 'react-bootstrap/Button';
import 'bootstrap/dist/css/bootstrap.min.css';

const Counter = () =&amp;gt; {
  const dispatch = useDispatch();
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;hr /&amp;gt;
      &amp;lt;Button
        aria-label="Increment value"
        onClick={() =&amp;gt; {
          dispatch(increment());
        }}
        variant="success"
        className="mx-2"
      &amp;gt;
        Increase
      &amp;lt;/Button&amp;gt;

      &amp;lt;Button
        className="button"
        aria-label="Decrement value"
        onClick={() =&amp;gt; {
          dispatch(decrement());
        }}
        variant="danger"
        className="mx-2"
      &amp;gt;
        Decrease
      &amp;lt;/Button&amp;gt;

      &amp;lt;Button
        className="button"
        aria-label="Decrement value"
        onClick={() =&amp;gt; {
          dispatch(incrementByAmount(10));
        }}
        variant="success"
        className="mx-2"
      &amp;gt;
        IncrementBy 10
      &amp;lt;/Button&amp;gt;

      &amp;lt;Button
        className="button"
        aria-label="Decrement value"
        onClick={() =&amp;gt; {
          dispatch(decrementByAmount(10));
        }}
        variant="danger"
        className="mx-2"
      &amp;gt;
        DecrementBy 10
      &amp;lt;/Button&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};
export default Counter;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6.To use redux state in other component use useSelector hook from react-redux like in features/coin/Coin.js.&lt;/p&gt;

&lt;p&gt;Remember the name of our reducer we imported in counterSlice.js, that's the name we have to use when using the useSelector() hook. &lt;/p&gt;

&lt;p&gt;It receives our state in arguments and then we can extract every other variable in our state with the help of destructuring like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {useSelector} from 'react-redux';
const Coin = () =&amp;gt; {
  const {coin} = useSelector((state)=&amp;gt;state.counter);
  return (
    &amp;lt;div style={{paddingTop: '200px'}}&amp;gt;
      &amp;lt;b&amp;gt;&amp;lt;big className="value"&amp;gt;Coins: {coin}&amp;lt;/big&amp;gt;&amp;lt;/b&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default Coin;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now in your Terminal, to start your React app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Congrats you made it! 🥳️
&lt;/h1&gt;

&lt;p&gt;You have setup React and Redux Toolkit! There are obviously many complex use cases of Redux which I will cover in the upcoming post. &lt;/p&gt;

&lt;p&gt;Subscribe to my youtube channel: &lt;a href="https://www.youtube.com/channel/UC9MmyicGIveu0AId8OFAOmQ" rel="noopener noreferrer"&gt;JavaScript Centric&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Like ❤️ and Share 🙏🏻 if you found this post helpful.&lt;/p&gt;

</description>
      <category>redux</category>
      <category>react</category>
      <category>reactnative</category>
      <category>reduxtoolkit</category>
    </item>
    <item>
      <title>Free Course For Everyone To Download Or Watch</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Fri, 12 Nov 2021 14:30:27 +0000</pubDate>
      <link>https://dev.to/ravics09/free-course-for-everyone-to-download-or-watch-1oko</link>
      <guid>https://dev.to/ravics09/free-course-for-everyone-to-download-or-watch-1oko</guid>
      <description>&lt;p&gt;Here I am providing list of websites where you can download many paid courses for free or watch online.&lt;/p&gt;

&lt;p&gt;Please save and like and share with others.&lt;/p&gt;

&lt;h1&gt;
  
  
  Website For Free Downloads
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.freecoursesonline.me/?1"&gt;freecoursesonline&lt;/a&gt;&lt;br&gt;
Free Courses Online Free Download Torrent of Phlearn, Pluralsight, Lynda, CBTNuggets, Laracasts, Coursera, Linkedin, Teamtreehouse etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://getfreecourses.co/"&gt;getfreecourses&lt;/a&gt;&lt;br&gt;
Download Udemy Paid Courses for Free. Learn Hacking, Programming, IT &amp;amp; Software, Marketing, Music, Free Online Courses, and more. Active site to upload udemy courses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://tutorialsplanet.net/"&gt;tutorialsplanet&lt;/a&gt;&lt;br&gt;
Download Udemy Paid Courses for Free. Learn Hacking, Programming, IT &amp;amp; Software, Marketing, Music, Free Online Courses, and more. Active site to upload udemy courses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://gigacourse.com/?1"&gt;desirecourse&lt;/a&gt;&lt;br&gt;
Download Udemy Paid Courses for Free. Learn Hacking, Programming, IT &amp;amp; Software, Marketing, Music, Free Online Courses, and more. Active site to upload udemy courses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://freecoursesite.com/"&gt;freecoursesite&lt;/a&gt;&lt;br&gt;
Download Udemy Paid Courses for Free. Learn Hacking, Programming, IT &amp;amp; Software, Marketing, Music, Free Online Courses, and more. Active site to upload udemy courses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://courseclub.me/?1"&gt;courseclub&lt;/a&gt;&lt;br&gt;
Download Free Courses Online of Phlearn, Pluralsight, Lynda, CBTNuggets etc. Everything is Full And Free For Download And Many More.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://online-courses.club/"&gt;online-courses&lt;/a&gt;&lt;br&gt;
Watch and Learn. Educate yourself!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>freecourse</category>
    </item>
    <item>
      <title>Remove all console log in single click.</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Mon, 23 Aug 2021 13:32:46 +0000</pubDate>
      <link>https://dev.to/ravics09/remove-all-console-log-in-single-click-18aa</link>
      <guid>https://dev.to/ravics09/remove-all-console-log-in-single-click-18aa</guid>
      <description>&lt;p&gt;There is no problem to use console.log at development level for logging or to debug your app but what if you forget to remove console log and push your code for review or for production.&lt;/p&gt;

&lt;p&gt;definitely  it will impact your app performance and will make your app slow and also less secure.&lt;/p&gt;

&lt;p&gt;So how you can remove all console.log from your code in single click ??&lt;br&gt;
Interested ? So lets go to ——&amp;gt; &lt;a href="https://youtu.be/UYKbSPMTfZY"&gt;https://youtu.be/UYKbSPMTfZY&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>console</category>
      <category>javascriptcentric</category>
    </item>
    <item>
      <title>How to create google service account ????</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Sat, 21 Aug 2021 19:54:33 +0000</pubDate>
      <link>https://dev.to/ravics09/how-to-create-google-service-account-45c</link>
      <guid>https://dev.to/ravics09/how-to-create-google-service-account-45c</guid>
      <description>&lt;p&gt;Watch one of the basic video on GCP Certification Preparation series: &lt;a href="https://youtu.be/VkoqhOFTV2I"&gt;https://youtu.be/VkoqhOFTV2I&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>7 Different Ways To Create Objects In Javascript 2022</title>
      <dc:creator>Ravi Sharma</dc:creator>
      <pubDate>Mon, 02 Aug 2021 12:30:11 +0000</pubDate>
      <link>https://dev.to/ravics09/7-different-ways-to-create-objects-in-javascript-160j</link>
      <guid>https://dev.to/ravics09/7-different-ways-to-create-objects-in-javascript-160j</guid>
      <description>&lt;p&gt;Watch this video if you don't know &lt;br&gt;
&lt;a href="https://youtu.be/HRP-5MS9DkQ"&gt;https://youtu.be/HRP-5MS9DkQ&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>javascriptobject</category>
    </item>
  </channel>
</rss>
