In the last section we put together our initial implementation of the author douceur.
We're now going to change over to our producers index G-S file so it should be empty right now.
Make sure you're not looking at the index G-S file in the SIRC directory.
We're going to import the author reducer into here.
We're going to combine it with a combined reducers call.
Thanks to the redux library.
And then immediately export it from this file.
So at the top we'll start by importing combine reducers from redux.
We will then import the author douceur that we just created as Auth. reducer from Auth. reducer and
then we will place our combined reducers call and immediately export it.
So export default combine reducers going to pass an empty object in and then we're going to wire up
the author reducer inside of here.
So remember one very important aspect of the combined reducers call this object that we're passing in
whatever keys we provide to this object are going to represent the keys that exist inside of our state
object.
So traditionally we put at least a little bit of thought into the the names we give each of these keys
for our author user.
I think that a very clear solution here or a very clear name would be something like.
Off like so.
So we'll say the off piece of state is being manufactured or produced by the auth reducer like so.
OK so this is looking pretty good.
Now the very last step very less than we have to do.
We're going to go back to our top level index file.
We're going to import this reducer and then we'll pass it off to the create store call.
So I'm going to go back to the top level index dot G-S file.
I'm going to add in an import statement for all the different reducers.
So import reducers from the reducers directory and it will pass that as the first argument to create
store.
So reducers like the tool looks good.
Again I think that this is probably going to be a good place to do a little test inside the browser
make sure that we haven't made any typos any errors anything like that.
I'll first start off by checking out my terminal.
Well make sure that my server is running without any error messages over here.
I will then change back over to the browser and go back to the re-act up and it looks like I still have
my text.
Hi there on the screen.
OK this is looking pretty good.
If you see any error messages at this point it likely means that you might have a little typo somewhere
inside the set up we just did.
So I encourage you always to do a little bit of trouble shooting on your end.
See if there is any easy to find errors and small typos or anything like that.
If you find it great.
If you can't find it let me know.
Post a run discussion include a screenshot.
Tell me what the error messages that you see at this point.
If you are seeing an error here.
90.
Maybe I didn't say 90 but maybe like 70 percent of the time.
It's usually going to be caused by some bad import or export statement.
Usually it's something like including curly braces when you shouldn't have curly braces which would
be like you know if you put curly braces on all the reducer right here.
Very common error to make.
So do triple check that if you are seeing an error.
Otherwise let's take a break continue the next section and talk about exactly what we're going to be
doing with our Auth. reducer so I'll catch you in the next section.