Next.js Discord

Discord Forum

Nextjs Providers

Answered
Silky ant posted this in #help-forum
Open in Discord
Silky antOP
I have the following structure :
>src
>app
>_components
>_providers
>(pages)

when i use a "useContext" in _components there are not defined , but when i use it in (pages) all look fine do you know what's going on
Answered by Velvet ant
it seems that component are missing the "use client" directive but not sure that its your issue
View full answer

11 Replies

Silky antOP
๐Ÿ‘up
Velvet ant
can you provide some code example please ?
@Velvet ant can you provide some code example please ?
Silky antOP
is it okay if i link a github repository with a minimal example ?
@Velvet ant sure
Silky antOP
btw Thank you for taking the time to look into my issue
Velvet ant
it seems that component are missing the "use client" directive but not sure that its your issue
Answer
Velvet ant
@Silky ant
Silky antOP
โœ… thanks , mb
good night ๐ŸŒŸ Thank you very much !
Velvet ant
yw ๐Ÿ™‚
can you set the thread as answered please ? ๐Ÿ™‚ @Silky ant