In less video we added in a ton of boilerplate to our project.
But as we saw we're still getting this air around the fact that we do not have reducers folder or an
index such as file inside there.
So let's take care of that very quickly.
Back inside my SIRC folder I'll make a new folder called reducers and inside of there I'll make a new
file called the index such as file.
So as we've seen previously we can import combine reducers from redux and then we can export default
combine reducers and we'll pass that thing and object.
Now at present we have nothing to put inside this object because we don't have any reducers inside of
application.
Sure we'll talk about what reducers we need in just a moment but we don't have any reducer whatsoever
to put in here.
As it stands.
So let's just try saving the file as is and see if our application works now.
I flip back over I'll see that while my text is displaying here on the screen.
You know I see that Aztec's to appear.
I can open up my console and unfortunately I'm getting a little kind of warning message here.
Really I would call this an error not a warning.
It only appears to be kind of a warning because our application still appeared on the screen.
But this definitely is an error.
So the air here says that our store does not have a valid reducer.
And hey that totally makes sense.
We called Combined reducers but we don't have any reducers to pass to it just yet.
So it turns out that this happens rather frequently when you're first getting started on any given redux
project.
You might start up the project put together some boilerplate but you don't know what reducers you're
going to need.
So you just kind of want get your application working and get that error message to go away.
You might eventually come back and add in some reducers which would solve the problem but maybe for
right now we don't really want to work on the reducers inside of our app at all.
Maybe we want to work on the Riak side of the project or something like that.
So as a little work around there's a tiny little trick that we can do here.
I would barely even call it a trick.
Inside the combined reducers call I can put in some dummy key like some dummy variable you can be total
jibberish like that if I want to it can be literally the word dummy or even something like replace me.
And then we can assign a dummy key an arrow function that is always going to return some fixed value.
Like maybe the number 10 or the number 9 9 9 or the string.
Hi there.
There's no purpose to this thing right here.
It's just tricking redux into thinking that it has a valid reducer.
That's it.
And the only reason we're doing this is to get that error message to go away.
Like I said anytime you start up a redux project you're probably going to want to do something like
this very briefly until you get a really good idea of how to structure your reducers in what reducers
you're going to need.
So now that I've got the dummy producer inside of here I can flip back over the error message has gone
away.
So now we are free to work on all the different other aspects of our application such as enhancing some
Riak components or maybe creating some action creators or whatever it might be.
And we don't have to worry about the fact that redux is just refusing to play ball.
So now we've kind of got some leverage here and we could start working on anything that we want now
to be honest Republican to start working on the reducers first but hey that's just life.
I just want to show you this little thing that you can do to get that your message to go away.
All right let's take another quick pause right here and we'll continue in the next section.