dmalvia / React_Redux_Tutorial

MIT License
202 stars 253 forks source link

after state change happens, why is the rerendering not happening. #1

Open aayushave opened 2 years ago

aayushave commented 2 years ago

Hi, redux state is set still the page doesn't reflects changes. and once again if i do some edit in vscode the changes are visible.

I m using reduc with nextjs

createStore code for nextjs with redux toolkit, I feel the issue is happening at this point ` import { createStore } from "redux"; import reducers from "./reducers/index"

const store = createStore(reducers,typeof window !== "undefined" ? window.REDUX_DEVTOOLS_EXTENSION && window.REDUX_DEVTOOLS_EXTENSION() : ""); `

export default store;

image image

it looks like above at first even after SET_PRODUCTS is set.

after i do some edit in vscode like enter a new line it works, and in redux devtool it SET_PRODUCTS again

image image ``

faizan153759 commented 2 years ago

sir after selecting a product remove_product run first than selected_product ,its a prob

dmalvia commented 2 years ago

What problem it is creating, As it is the clean-up function that runs first and does the clean-up of the previous product state and then you have a new product selected.

Regards Dipesh

On Thu, Jun 23, 2022 at 1:27 AM faizan153759 @.***> wrote:

sir after selecting a product remove_product run first than selected_product ,its a prob

— Reply to this email directly, view it on GitHub https://github.com/dmalvia/React_Redux_Tutorial/issues/1#issuecomment-1163757992, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBF5F65RDJC5JVG5RWECU3VQOONLANCNFSM5SYIUJGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>