React Hooks Tutorial - 16 - useContext Hook Part 2

React Hooks Tutorial - 16 - useContext Hook Part 2

Codevolution

5 лет назад

245,476 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Akoatem
Akoatem - 28.07.2023 17:48

I have watched and practiced all your videos on react from basic, render, hooks, api call etc for the past 3 weeks now and I can proudly say I can work on some projects. I didnt want to rush on projects without learning react. I am a backend developer the the love for react and it wonders are overwhelming. Thank you very much.

Ответить
Why Suman Code?
Why Suman Code? - 10.07.2023 18:51

In this part my code seems ugly and in my case it did not work and tells error
App.jsx:7 Uncaught TypeError: Cannot read properties of undefined (reading 'createContext')

Still I am going in next episode.

Ответить
Rishi Raj
Rishi Raj - 24.05.2023 15:41

🙏👍

Ответить
Divinesteel
Divinesteel - 06.07.2022 18:08

Is there any way to change the state from inside the context? What practice is best for that? Thanks in advance.

Ответить
Paschal Okafor
Paschal Okafor - 19.06.2022 18:11

Man! You are the best .
Codevolution rocks!!!

Ответить
Vignesh Gunasekaran
Vignesh Gunasekaran - 16.06.2022 08:21

UserContext -> Provider, Consumer
more nesting

Ответить
Tyrone
Tyrone - 24.02.2022 06:09

Best Context tutorial I’ve found to date.

Ответить
Rohit chaudhry
Rohit chaudhry - 21.01.2022 23:18

Excellent video. You're absolutely a gem!!

Ответить
crazycodes
crazycodes - 19.01.2022 13:15

import ComponentC from './components/ComponentC'

Ответить
Mentor Aliu
Mentor Aliu - 18.01.2022 13:41

my go-to teacher when i'm having issues

Ответить
Pawan bhatt
Pawan bhatt - 31.12.2021 18:05

learn lot from you

Ответить
sai krishna banda
sai krishna banda - 04.10.2021 18:39

thabsl y

Ответить
Kermit Davis
Kermit Davis - 19.09.2021 00:49

Not sure who taught you how useContext works but this is outright wrong and far more convoluted then it needs to be

Ответить
KASHMIR TECH TV
KASHMIR TECH TV - 13.07.2021 18:36

Great

Ответить
Vijay Kumar
Vijay Kumar - 13.06.2021 17:05

How to create a context in Login component and make use of the login details in all other components? In this tutorial the context is created in App component and used in all other components. Please create a video to creat context in other components and make use of everywhere in the project. @codevolution

Ответить
The Superior Man
The Superior Man - 04.04.2021 17:28

You made it so easy. Thank you so much. I subscribed

Ответить
Md Abu Raihan
Md Abu Raihan - 01.04.2021 07:35

Excellent!

Ответить
404. ERRoR.
404. ERRoR. - 04.03.2021 19:48

why did you not targeted directly component F instead of component C

Ответить
Pavel Kapaak
Pavel Kapaak - 19.02.2021 01:35

god save us from callback hell:((

Ответить
Kulbhushan Dhongade
Kulbhushan Dhongade - 17.02.2021 09:33

Error : 1. mention :: import {UserContext} from '../App' error showing ::: ./src/component/ComponentC.js
Module not found: Can't resolve './ComponentE' in '/home/kulbhushan/Desktop/React/route/src/component'

PLEASE HELP ME NOW

Ответить
vamshi vamshi
vamshi vamshi - 27.01.2021 19:13

It' is full complete tutorial?

Ответить
AJAZ MIAH
AJAZ MIAH - 16.01.2021 08:35

is it a bad practice to use one Context only and pass in all the data that you need as a value so we dont need to use nested provider and consumer?

Ответить
Pedro contreras avendano
Pedro contreras avendano - 09.12.2020 01:49

Thank you!

Ответить
Max Minenko
Max Minenko - 07.12.2020 11:12

Clear and concise, your explanations work! Thank you.

Ответить
demian sims
demian sims - 22.11.2020 20:56

I was thinking you were going to go into Redux but today I learned about React.Provider/React.Consumer ! I had no idea.

Ответить
parivesh badal
parivesh badal - 18.10.2020 15:10

I dont see the output at all!! i wrote the same code!!

Ответить
Michael Midnite
Michael Midnite - 13.09.2020 11:31

very good instructor

Ответить
Eduardo Oliveira
Eduardo Oliveira - 07.09.2020 00:21

It's a very good thing to understand how things work under the hood, in addition to the available libraries. I'm following this playlist and things really got ugly here, but this content is really great to know about. Thank you for the great <Content.Provider> you do here 😅😁

Ответить
Rafay Codes
Rafay Codes - 21.08.2020 04:57

Sir, I know i am late but i need just a little help. How can we enter multiple values in the <UserContext.Provider> , Please let me know. Supported on Paypal .

Ответить
Олександр Дикса
Олександр Дикса - 09.06.2020 15:37

you are the best!

Ответить
Ayan Bhadury
Ayan Bhadury - 09.04.2020 17:39

Instead of creating multiple context providers, can't we pass the props as objects, & retrieve it accordingly using context consumers?

Ответить
Carlos Méndez
Carlos Méndez - 09.04.2020 04:40

You're an amazing teacher! I had seen a lot of videos but I didn't get it. Your videos are so useful! Thanks!

Ответить
Mohammed Mansoor
Mohammed Mansoor - 07.04.2020 11:40

hi, i have doubt as in class level we can pass data as prop to child , is it possible to pass data from parent to child in function ?

Ответить
Conax Learn
Conax Learn - 12.03.2020 12:06

Instead of creating one UserContext and one ChannelContext, can you not create just one context and pass the values as an object? Then you don't need to have nested context. Or am I missing something?

const DataContext = React.createContext()

<DataContext.Provider value={{user:'Vishwas', channel:'Codevolution'}}>
// Component code here...
</DataContext.Provider>

Ответить
Abu Darda
Abu Darda - 13.02.2020 10:33

You are so good. Please make a series on Context API

Ответить
kozmikhero
kozmikhero - 29.09.2019 19:34

Don't forget that in the original context system if you wanted to use the context data in the lifecycle methods you would have to wrap the component in an additional component then pass the data down as props. This was also very annoying since I remember many times when I had to do just that.

Ответить
stevenjchang
stevenjchang - 17.09.2019 22:51

Wow! Thank you so much for distinguishing context from useContext hook! That made things a lot clearer.


Great tutorial!

Ответить
Héctor Serrano
Héctor Serrano - 18.08.2019 00:52

I simply cannot think of anyone else that could pull off SUCH a great tutorial with all your examples that you come up and those attractive phrases that you see on tv : 'If there was only a better way to do this'!

I'm sold! I like your content bruh!

Ответить
Nick Phillips
Nick Phillips - 14.08.2019 17:39

Thank you Vishwas. This series is a breath of fresh air. Well done

Ответить
Daniel Khadivi
Daniel Khadivi - 11.07.2019 16:57

Excellent video. Thank you for demonstrating multiple contexts. Most educators do not go this far. Your tutorial is more comprehensive and better relates to real-life challenges. Great work!

Ответить
velmurugan
velmurugan - 26.06.2019 16:30

I watch all reactjs tutorial.. your awesome....

Ответить