Tutorial to understand how React work:
View the Project on GitHub MazzinWX/React-Redux-Firebase-tutorial
BeCode
“In Code We Trust”
Lovelace 3.9
React Redux & Firebase tutorial
Started 06/05/2019
Various steps: - Understand React and how components work - Add redux middleware (Thunk) - Create firebase DB and connect it
It’s a good base to undestand NoSql databases and help to start with Rethinkdb ;)
Redux & Async code: To better understand Async communication, we use a middleware => “Thunk”. Thunk: - Halts the dispatch - Perform async request - Resume dispatch
graph TD;
D[Action Creator]
C[Reducer]
A((Redux))
E[Dispatch Action]
B[Component]
subgraph full graph
D---C
E---|dispatches an action - e.g. addpost <br/> Contains optional payloads|B
subgraph Action & dispatch
D---|Thunk: <br/> Halt the dispatch <br/> Perform async request <br/> Resume dispatch|E
end
subgraph reducer part
C---|Update central state|A
A---|subscribe to changes - props|B
end
end