We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think it might not import the username, but I check a lot of time, I did't find anything different with ur code, pls help me!!!
// pages\index.js import React, { useContext } from "react"; import { Context } from "../context"; import { useRouter } from "next/router"; import axios from "axios"; export default function Auth() { const { username, setUsername, secret, setSecret } = useContext(Context);
// context\index.js import React, { useState, createContext} from "react"; export const Context = createContext(); export const ContextProvider = (props) => { const [username, setUsername] = useState(""); const [secret, setSecret] = useState(""); const value = { username, setUsername, secret, setSecret, }; return <Context.Provider value={value}>{props.children}</Context.Provider>; };
The text was updated successfully, but these errors were encountered:
hello, have you fix this ?
Sorry, something went wrong.
I am stuck at the similar problem
No branches or pull requests
I think it might not import the username, but I check a lot of time, I did't find anything different with ur code, pls help me!!!
The text was updated successfully, but these errors were encountered: