Code from the Modern React and Redux course by Stephen Grider at Udemy
Completed 2019 update sections
-
My components are all functional components with hooks, from lecture 74 onwards.
-
My components are all in a
src/components
directory. Stephen starts to do this after a while too. -
I usually destructure props, e.g.
const SeasonDisplay = ({ lat }) => ...
vsconst SeasonDisplay = (props) => ...
-
My pics application is split into two version directories:
PicsV1
andPicsV2
. -
I rarely, if ever, use the name
payload
for the data contained in a Redux action. The exception to this is when usingredux-promise
which requires that the promised data name has to bepayload
. -
I always create a set of 'types' for the action creators, this avoids any possibility of typos between action creators and reducers, e.g.
dispatch({ type: 'LOAD_POSTS', posts });
...
const postsReducer = (posts, action) => {
switch (action.type) {
case 'LAOD_POSTS': // Oops, should be 'LOAD_POSTS'
...
Stephen highlights this in lecture 221.
-
I always use the terms 'log in' and 'log out', to make a contrast with 'sign up'. There is no signup here, but I have continued to do this.
-
My
fetchStream
andfetchStreams
are calledgetStream
andloadStreams
respectively. Much less confusing, n'est ce pas? :-) -
I have split my Translate app into
TranslateV1
from section 23 andTranslateV2
from section 24. In addition, I have made a third versionTranslateHooks
.
It is a pity that Stephen shows the wrong way to use context in this section, before showing the correct way in the next section.
I have used Git at the command-line for more than 10 years. Over that time, I have tried many different graphical shells for Git, without finding one that was easier and nicer to use than the command-line (in my view).
I have now found that GitKraken is an excellent Git shell and would advise using it to everyone.
If you have any questions about this repository, or any others of mine, please don't hesitate to contact me.