useContext with useReducer React Hooks Crash Course

DesignCode
DesignCode
26.4 هزار بار بازدید - 3 سال پیش - Create a context with reducer
Create a context with reducer for an online commerce website, using React hooks.

Access the written version of this tutorial and the source files:
➡ Part 1: https://designcode.io/react-hooks-han...
➡ Part 2: https://designcode.io/react-hooks-han...
➡ Part 3: https://designcode.io/react-hooks-han...

View the code sandboxes:
➡ Starter project: https://codesandbox.io/s/usereducer-h...
➡ Completed project: https://codesandbox.io/s/usereducer-h...

Part 1
0:00 - Introduction
1:19 - Understand useReducer
1:26 - Starter project
2:37 - Create the context
4:17 - Create the reducer

Part 2
7:30 - Create the provider
12:53 - Create the useContext hook
13:45 - Use the provider

Part 3
14:09 - Add and remove product from cart
17:36 - Cart page
18:58 - Test the code
19:23 - Conclusion

#reactjs #webdev #javascript
3 سال پیش در تاریخ 1400/09/16 منتشر شده است.
26,477 بـار بازدید شده
... بیشتر