Skip to content

Commit 882eb77

Browse files
committed
note
1 parent f731669 commit 882eb77

File tree

1 file changed

+111
-0
lines changed

1 file changed

+111
-0
lines changed

part7/note2.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<!-- this is for part 7 ex 9 onwards -->
2+
3+
- [x] if you make it a git repo dont forget to gitignore those env files
4+
5+
### Ex 7.9 - 7. 11
6+
7+
- [] maintain state using redux
8+
- identify which to change (the useState funcs)
9+
- map out an idea of the outcome store shape
10+
11+
- Observation:
12+
- <Provider store = {store}> App </Provider>
13+
- for each component under /components
14+
- mapStateToProps(state)
15+
- export default connect (mapStateToProps, mapDispatchToProps) (nameOfComponent)
16+
- The way each reducers are written, actionCreator
17+
18+
- redux thunk will allow async operations
19+
- `npm install --save-dev redux-devtools-extension` to use debugs
20+
21+
- [x] complete blogReducer
22+
- All action:
23+
- [x] initializeBlogs
24+
- [x] create
25+
the new notification use the blog itself. how is *solution* handled
26+
- [x] update
27+
question : a func which was async coz it called a service say becomes a redux and now uses dispatch, no longer needing the service call. Do I still maintain an async func coz the dispatch will inturn call an action which makes await request but the action will itself be async ????
28+
- [x] remove
29+
axios.delete has no return value 🤦‍♂️
30+
- I was mislead by 'internal state of React components'. It just means useState
31+
32+
- [x] Blog View to redux
33+
- put a property view : false in blog store
34+
- when clicked view : true and calls a toggle action
35+
- bug: when I like the view goes to false again
36+
- maybe fixing the blog model in backend will fix it
37+
- nope that's a long fix
38+
- instead modify the like action
39+
40+
### Ex 7.12
41+
42+
- [] Store signed in user in the Redux store.
43+
- storage.saveUser is not working for some reason (fixed by moving to reducer)
44+
- now user.name is not being read even though its rendered in the blog component
45+
- moved the logic to loginReducer and it worked. is it the right way tho 🙄
46+
47+
### Ex 7.13
48+
49+
- [x] use react router for User view
50+
- `npm install --save react-router-dom`
51+
- [] I can move the state to redux
52+
- [x] I have to style it with tables
53+
54+
### Ex 7.14
55+
56+
- [x] view for individual user
57+
- order of Router matters !
58+
- [] course material was converting match.params.id to Number.. why?
59+
60+
### Ex 7.15
61+
62+
- [x] view for individual Blog
63+
64+
- woah wat did I do to my blogStyle
65+
- I added style twice 😅
66+
67+
- suddenly in the questions blogs view doesnt show the author ??? (course material)
68+
69+
### Ex 7.16
70+
71+
- [x] Navigation menu for application
72+
- [] make it nav bar or add some styles
73+
74+
### Ex 7.17
75+
76+
- [x] Commenting on a blog post
77+
- modify backend
78+
- comments field inside every blog
79+
80+
### Ex 7.18
81+
82+
- [x] Commenting on a blog -- front end
83+
- study the diff and update takeaways
84+
85+
- to add a feature (comment)
86+
- make backend changes
87+
- new schema, new api endpoint
88+
- test the features
89+
- make frontend changes
90+
- make new action creators
91+
- update related components in frontend
92+
93+
### Ex 7.19
94+
95+
- [] style your website
96+
- [x] container
97+
- [x] table
98+
- [x] form
99+
- [x] button
100+
- [x] notification
101+
- [x] nav bar
102+
103+
104+
105+
### Questions:
106+
107+
- when we pass an argument to a component
108+
good practise to pass minimum required ?
109+
eg : we pass anecdotes.id instead of passing in anecdotes (say while like)
110+
111+
- individul blog view / hide with redux

0 commit comments

Comments
 (0)