becodewala's profile picture. Full Stack Developer (MERN) 👨‍💻| YouTube (becodewala) 🚀 | Javascript 🌍

Vikash Kumar 👨‍💻 👁️⃤

@becodewala

Full Stack Developer (MERN) 👨‍💻| YouTube (becodewala) 🚀 | Javascript 🌍

New auth method in market See the last authentication methods. I found on acentric ui.

becodewala's tweet image. New auth method in market 

See the last authentication methods.

I found on acentric ui.

👨‍💻Design Forgot password page with light/dark mode support. Tech: React+ Tailwind CSS + Typescript Drop Feedback 👇🗨️

becodewala's tweet image. 👨‍💻Design Forgot password page with light/dark mode support.

Tech: React+ Tailwind CSS + Typescript 

Drop Feedback 👇🗨️
becodewala's tweet image. 👨‍💻Design Forgot password page with light/dark mode support.

Tech: React+ Tailwind CSS + Typescript 

Drop Feedback 👇🗨️

🧩 What’s the difference between reducers and extraReducers?

becodewala's tweet image. 🧩 What’s the difference between reducers and extraReducers?

🧩 How do you dispatch multiple actions in Redux Toolkit? You can dispatch multiple actions in sequence using useDispatch. 🔹 Example: dispatch(clearCart()); dispatch(showToast('Cart cleared!'));


🧩 How do you handle pending, fulfilled, and rejected states in createAsyncThunk? You use extraReducers inside your slice.

becodewala's tweet image. 🧩 How do you handle pending, fulfilled, and rejected states in createAsyncThunk?

You use extraReducers inside your slice.

🧩 What is createAsyncThunk used for? - createAsyncThunk simplifies writing async actions (like fetching data from an API). It automatically generates three action types: pending – when the request starts fulfilled – when the request succeeds rejected – when the request fails


🧩 How do you write asynchronous logic in Redux Toolkit? Use the createAsyncThunk method — it helps you handle API calls or async operations cleanly, without manually writing thunks.


💠Redux Toolkit uses Immer under the hood in createSlice() and createReducer(). When you “mutate” state (like state.value++), Immer records the change and returns a new, updated state object.


🧩 How does Redux Toolkit handle immutability internally? 🔹 Explanation: In Redux, state must be immutable — you can’t directly modify it, you must create a copy and then update it. Traditionally, you had to do this manually: return { ...state, value: state.value + 1 };


💠What is the Provider component used for in Redux? The Provider component from react-redux makes the Redux store available to all React components in your app. Without Provider, your components won’t be able to access Redux state.

becodewala's tweet image. 💠What is the Provider component used for in Redux?
The Provider component from react-redux makes the Redux store available to all React components in your app.

Without Provider, your components won’t be able to access Redux state.

⚒️What are the useSelector and useDispatch hooks used for?

becodewala's tweet image. ⚒️What are the useSelector and useDispatch hooks used for?

👨‍💻How do you access state from Redux Toolkit in a React component? Use the useSelector hook. import { useSelector } from 'react-redux'; const cartItems = useSelector(state => state.cart); This selects and subscribes to part of the state from the Redux store.


👨‍💻How do you combine multiple slices in Redux Toolkit? You can combine multiple slices (e.g., user, cart, products) by passing them to configureStore:

becodewala's tweet image. 👨‍💻How do you combine multiple slices in Redux Toolkit?

You can combine multiple slices (e.g., user, cart, products) by passing them to configureStore:

Reducer in redux-toolkit 👨‍💻Reducers are functions inside a slice that describe how state changes based on an action. Example: reducers: { increment: (state) => { state.value += 1; }, decrement: (state) => { state.value -= 1; }, }


⚒️How does createSlice() simplify reducer logic?

becodewala's tweet image. ⚒️How does createSlice() simplify reducer logic?

👨‍💻What is the purpose of the configureStore() method? configureStore() simplifies store creation by: Automatically adding middleware like redux-thunk Enabling Redux DevTools Allowing easy reducer combination It’s the modern replacement for createStore().


👉 Whether you’re building your MVP or pitching to investors, Pitch Mint makes it easier to present your startup in style. 💡 Would love your feedback! Check it out here: pitch-mint-frontend.vercel.app #Startups #MVP #PitchDeck #IndieHackers #BuildInPublic

becodewala's tweet image. 👉 Whether you’re building your MVP or pitching to investors, Pitch Mint makes it easier to present your startup in style.

💡 Would love your feedback!
Check it out here: pitch-mint-frontend.vercel.app

#Startups #MVP #PitchDeck #IndieHackers #BuildInPublic

👨‍💻How do you configure a store in Redux Toolkit? import { configureStore } from '@reduxjs/toolkit'; import cartReducer from './cartSlice'; export const store = configureStore({ reducer: { cart: cartReducer, }, });


💠What is a store in Redux? 🔹 Explanation: The store is a central place that holds the entire state of your app. It: Keeps track of state Allows access via getState() Allows updating via dispatch(action) Registers listeners via subscribe()


United States Trends

Loading...

Something went wrong.


Something went wrong.