python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
how to use useEffect and useContext with fetching data?
I'm trying to use React's Context API as well as Hooks with fetching data.
I'm coding [createContext] like below, but it doesn't work.
import { createContext, useEffect } from "react";
expo...
Yuzu
Votes: 0
Answers: 1
How do I access data from useReducer(react) in other react-components?
How do I access the basket in other components like Navbar to show the contents of cart ?
And please correct me if there is any logical errors in the code.
Thanks in advance.
const cartReducer = (...
Siva
Votes: 0
Answers: 1
React Context does not work in Netlify. TypeError: Cannot read properties of undefined
I am having this issue every time I deploy my react application to Netlify:
The code works locally however, once deployed to Netlify it generates the above error.
Here is my Code:
import { createCon...
user18533851
Votes: 0
Answers: 0
try to useContext in React
I am trying to use useContext in react and I have a problem sending value into the provider but in useContext I can not get this value
make createContext in parent "index"
export const mul...
amirSh2010
Votes: 0
Answers: 1