There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
You can also find further discussion and get answers to your questions over in Language Help.
Agree with a comment or answer? Like () to up-vote the contribution!
Iam honestly confused, when middleware in redux were introduced , they had to be passed into the configurestore function using applyMiddlewar but now that we are using redux thunks, which are also a type of middleware, why arent we passing this middle ware to the “applymiddleware” in configureStore. what am i missing?
To be honest, I grow irritated starting from the React router section to Redux section. A LOT OF STUFF WERE NOT EXPLAINED CLEARLY, freaking confusing to learners. Learners have to spend a lot of unnecessary time figuring out somewhere else what the heck what it is teaching. A little bit layman term would help instead of long articles with fancy terms that confuse the heck out of learners.
Let’s go back to problems in this part:
1 . at least explain a bit about the naming of type.
2. could have just explained arg thunkAPI alltogether in this part.
3. my answer should have been accepted since I only make my own variable names:
const recipes = await fetchRecipes()
const result = await recipes.json()
return result
but no, I had to go copy solution to pass, and still not knowing why I must return json version.
First they told us that middleware is supposed to intercept thunk, yet after their teaching, I still find no relation between their logger middleware and the recipe thunk presented to us.
Now to your question, the answer is: no, they did not elaborate AT ALL. My search shows that applymiddleware is when you use createStore from ‘redux’. but when it comes to configureStore from ‘@reduxjs/toolkit’, you dont need it. but if you really want to use the logger middleware they taught us under configureStore, you would have to do something like as follows:
import { configureStore, getDefaultMiddleware } from ‘@ reduxjs/toolkit’;
…
const store = configureStore({
reducer: rootReducer,
middleware: [logger, …getDefaultMiddleware()],
});
Not sure if it is correct, all I want to complain is the lack of simple explanation for learners but instead bunch of long-A fancy term paragraphs