I have a larger reducer, and I want to add another slice to it that will be fairly complicated unto itself. For example, here’s a large, already complex reducer:
const initialState = {
bigchunk1: { ...someObject },
bigchunk2: true,
bigchunk3: [...somevalues],
bigchunk4: 'etc'
}
function mainReducer(state = initialState, action){
switch(action.type){
case Actions.CASE1:
return {
...state,
bigchunk1: {
...state.bigchunk1;
somevalue: action.payload.this_is_already_enough_nesting
}
}
case Actions.CASE2:
return {
...state,
bigchunk4: 'this goes on for awhile'
}
// lots more cases
default:
return state
}
}
I want to add a new slice to state, so the whole initialState would end up in the store looking like this:
const initialState = {
bigchunk1: { ...someObject },
bigchunk2: true,
bigchunk3: [...somevalues],
bigchunk4: 'etc',
newslice: { ...someComplicatedThing }
}
But rather than have to write all my new cases into my original reducer (along with a very messy level of nesting and spread operators), I want to write a new reducer that handles just the cases pertinent to newslice
:
const initialState = { ...someComplicatedThing }
function newSliceReducer(state = initialState, action){
switch(action.type}{
// cases here
}
}
I am aware of combineReducers
, but I’m having a hard time thinking of how to apply that in this scenario. combineReducers
can take these two reducers and place them as siblings, but how can I combine these so that newSliceReducer
and its associated state becomes a child of mainReducer
under the name newslice
? I feel like this should be simple, but its escaping me right now. I have been reading the redux docs, but I’m not seeing the answer clearly. I do not want to use redux-toolkit
or any outside libraries.
generic advair diskus no prescription
want to buy prednisone
lasix normal dosage
It’s perfect time to make a few plans for the longer term and it’s time to be happy.
I’ve learn this post and if I may I want to counsel you few attention-grabbing things or suggestions.
Maybe you can write next articles regarding this article.
I wish to learn more issues about it! http://antiibioticsland.com/Bactrim.htm
I quite like looking through a post that will make men and women think.
Also, thank you for allowing for me to comment! https://herreramedical.org/hydroxychloroquine
where can i order clomid online
Howdy just wanted to give you a quick heads up.
The text in your post seem to be running off the screen in Internet explorer.
I’m not sure if this is a formatting issue or something to do with internet browser compatibility but I thought I’d post to let you know.
The style and design look great though! Hope you get the issue
solved soon. Many thanks https://hhydroxychloroquine.com/
Nice post. I used to be checking constantly this weblog and I am impressed!
Extremely helpful info particularly the closing part
🙂 I maintain such information much. I was seeking this particular
information for a very long time. Thanks and
good luck. http://hydroxychloroquined.online/
where to buy clomid – order clomid clomid online
Hey there! I’ve been following your weblog for a while now and finally got the courage to go ahead and
give you a shout out from Huffman Texas! Just wanted to tell you keep up the fantastic job! https://buszcentrum.com/zithromax.htm
amoxil mg
austria pharmacy online – cialis buy online usa cialis online ordering
buspar and prozac
stromectol xl – buy ivermectin canada cost of stromectol medication
Hello! Quick question that’s completely off topic. Do you know how to make your site mobile friendly?
My blog looks weird when viewing from my apple iphone.
I’m trying to find a template or plugin that might be able
to resolve this problem. If you have any recommendations, please share.
Appreciate it! http://www.deinformedvoters.org/hydroxychloroquine
fluoxetine generic
online casinos – hollywood casino online real money real money casino app
cheapest place to buy propecia
best ed pills – where to buy ed pills what is erectile dysfunction
online prednisone – prednisonepll prednisone over the counter canada
how to order viagra from mexico – viagra buy australia sildenafil 110 mg
lowest price cialis online – Best price for cialis cialis soft 40 mg
ivermectina – stromectol tablets for humans ivermectin medication
tom selleck and dr phil ed pill – buy online drugs ed pills walmart
dapoxetine brands in pakistan
lisinopril stopping dosage
generic ventolin – can i buy ventolin over the counter in usa generic ventolin
buy lisinopril hydrochlorothiazide
can you get cytotec over the counter – cytotec 2017 how to get cytotec
doxycycline price usa – doxycycline 10mg doxycycline pills over the counter
neurontin 300mg tablet cost – synthroid 125 mcg synthroid 137 cost
Hi, I do think this is a great website. I stumbledupon it
😉 I may revisit yet again since I book-marked it. Money and freedom is the
best way to change, may you be rich and continue to
guide other people. https://buszcentrum.com/priligy.htm
It’s the best time to make some plans for the longer term and
it’s time to be happy. I have read this put up and if I may I
want to counsel you few fascinating issues or tips.
Maybe you could write next articles referring to this article.
I want to learn even more things about it!
indian generic viagra – buy viagra online generic
discount generic cialis online – tadalafil 5mg prices online pharmacy birth control pills
Everything is very open with a precise explanation of the issues.
It was really informative. Your site is extremely
helpful. Many thanks for sharing!
sildenafil tablets 5mg
laura vardenafil generic – buy cheap vardenafil uk how long does vardenafil take to work
Neat blog! Is your theme custom made or did you download it from somewhere?
A design like yours with a few simple adjustements would really make my blog shine.
Please let me know where you got your theme. Cheers
I enjoy reading through a post that can make people
think. Also, thank you for allowing for me to comment!
prednisone 40 – 5094 prednisone prednisone 10 mg order online
Thanks very interesting blog!
I pay a visit everyday some sites and information sites to read content, except
this webpage offers feature based writing.
accutane how to get – accutane cost in mexico accutane over the counter uk
There is definately a great deal to know about this issue.
I really like all of the points you’ve made.
Hello, all the time i used to check weblog posts here early in the
break of day, as i like to learn more and more.
cvs amoxicillin price no insurance – buy amoxicilin online amoxil rash
buy xenical viagra propecia
medrol prescription drug – lyrica 75 mg price in canada lyrica 5mg
assignments for sale – mba essay service write my paper
buy online viagra tablets – Viagra australia generic viagra online from india
naturally like your website however you have to check the spelling on several of
your posts. Many of them are rife with spelling problems and I find it very bothersome to inform the truth nevertheless I will surely come back again. quest bars http://j.mp/3C2tkMR quest bars
Everything is very open with a really clear clarification of the issues.
It was really informative. Your site is very helpful. Many thanks
for sharing! cheap flights http://1704milesapart.tumblr.com/ cheap flights
stromectol pills canada – buy stromectol pills ivermectin for people
This is very interesting, You are a very skilled blogger.
I’ve joined your rss feed and look forward to seeking more of your wonderful post.
Also, I’ve shared your web site in my social networks!
scoliosis surgery https://0401mm.tumblr.com/ scoliosis surgery
prednisone cost in india – generic prednisone without prescription generic prednisone online
Nice post. I used to be checking constantly this weblog and I am
inspired! Extremely useful info specifically the ultimate part 🙂
I deal with such info much. I used to be looking for this certain info
for a very long time. Thanks and best of luck. scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery
My relatives every time say that I am wasting my time
here at web, but I know I am getting know-how all the time by reading thes pleasant content.
quest bars https://www.iherb.com/search?kw=quest%20bars quest bars
lasix picture
ventolin cost – ventolin cost canada buy albuterol online
order prednisone online
cytotec otc – can you order cytotec cytotec 50 mg
doxycycline uk cost – how much is prednisolone cost discount prednisolone
Howdy! This post could not be written any better! Looking through this post reminds me
of my previous roommate! He constantly kept talking about this.
I will forward this post to him. Pretty sure he will have
a great read. I appreciate you for sharing! https://tadalafili.com/
cytotec where to buy quickly
stromectol sales – buy stromectol 2mg stromectol ivermectin tablets
clomid over the counter
ivermectin 1mg – ivermectin gel ivermectin over counter
sildenafil 20 – silepilled cheap generic sildenafil
cheap tadalafil – buying tadalafil online safely generic tadalafil online
clomid no prescription nek nox
buy accutane online cheap – accutane cost without insurance accutane costs canada
term papers for sale – affordable term papers essays writing
buy stromectol for humans – ivermectin uk stromectol 6 mg tablet
usa pharmacy online viagra – Cialis online where can i get cialis
tania vardenafil generic – vardenafil online pharmacy ed pills cheap
buy vardenafil online europe – order vardenafil best ed pills on the market
does plaquenil cause weight gain – hydroxychloroquine prescribing information prednisone 25g
vilitra 20 – site click here to read the full article