Next.js Discord

Discord Forum

FACING ERROR WITH TYPESCRIPT REACT WHILE USING CONTEXT PROVIDER

Unanswered
Basset Bleu de Gascogne posted this in #help-forum
Open in Discord
Basset Bleu de GascogneOP

10 Replies

Basset Bleu de GascogneOP
Two errors
@Basset Bleu de Gascogne Two errors
what is this filename
@Ray what is this filename
Basset Bleu de GascogneOP
now I realize that it was ts
instead of tsx
@Ray what is this filename
Basset Bleu de GascogneOP
so I am kind of confused . My app provider wraps the login import { useState } from 'react'
import { DashboardContextProvider } from '../contexts/User.context';
import './App.css'
import Login from "../components/loginPage"

function App() {
const [count, setCount] = useState(0)

return (
#Unknown Channel
<DashboardContextProvider>
<Login />
</DashboardContextProvider>

</>
)
}

export default App
even tho I just want to extract the value from it and not wrap it
is there a way around
what do you mean?
@Ray what do you mean?
Basset Bleu de GascogneOP
So this is my loginPage where user will put in email and password and once verfied I will have it populate my context with the values . So I created a hook as well to check the user is not undefined as well and I dont want to wrap my login with provider or do I have to do it , I just need the values from it