Hi Edward, glad you liked the tutorial!
The issue here is that you want a way for the frontend to interpret the needs static also. What I have done in the paste is to use react-router’s onEnter event handler (called whenever a route is entered on the client). This function even provides a callback (see docs) which lets you…
The problem here is that you’re invoking getSchoolByAlias too early (in the tutorial example the promiseMiddlware is what actually generates and dispatches the action).
You also won’t have access to this.props.* when declaring a static, because those properties only exist within other functions…
All looks fine to me :)
As long as the reducer is simple there’s no need to break it out into multiple files.
I would clarify that the reducer itself is the switch block/function(s) that describe the transformation of state. What you’ve posted is the default state of the reducer, so in this article’s…
Redux leaves you free to decide how to split to split your reducers; they are just transformations that the state tree goes through every time a `dispatch` triggers them.
So you never ‘need’ to create a new reducer, you could put all the transformations in one big file, that would just get cumbersome to read/maintain once…
I think this is my fault; I left a Babel 6 configuration file in the article after I downgraded the dependency back to 5, because people were having problems.
If you use the configuration files included at the top of the tutorial (I just changed .babelrc), then this should work now.
Let me know if it doesn’t!
Hi, glad you liked the tutorial!
I think your double request problem might be this. Something in how the static needs =  is getting wrapped has changed in newer versions I think.
As for the localhost difficulty, localhost is usually mapped to 127.0.0.1 so I’m not sure what problem you are…
I’m glad you enjoyed the tutorial. The simplest way I have found of doing this is wrapping your css requires in some check for server/client side, ie:
Though this isn’t ideal. Some other solutions were discussed a few months ago…
This is a problem with how Windows handles env variables vs Linux/OSX.
I’m afraid I don’t have a Windows machine to test on ATM, but this looks helpful: