Dark theme in NextJS 13 app dir with next-intl #370
Replies: 2 comments 2 replies
-
anyone who knows the answer of this issue |
Beta Was this translation helpful? Give feedback.
0 replies
-
@aXenDeveloper |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
When I start writing, I want to thanks for this awesome lib for i18n in nextjs 13 app dir! @amannn you doing amazing job!
I'm working on my new portfolio, but I have one problem with dark theme when I use
next-intl
.I use simple script for apply
theme="dark"
inhtml
tag:My repo with code: https://github.com/aXenDeveloper/web-axendev/tree/axendev_2
Demo: https://web-axendev-git-axendev2-axendeveloper.vercel.app/
I use example project from here for not refreshing page when change the language: https://github.com/amannn/next-intl/tree/feat/next-13-rsc/examples/example-next-13
My problem is when I change language, all attributes in
html
tag will be remove.Theme system should be dark.
Before change the language:
After change the language:
I tried with
useEffect
change tag in html, but this solution have issue with flash effect.Any idea how can I resolve this problem?
Beta Was this translation helpful? Give feedback.
All reactions