nandorojo / solito

🧍‍♂️ React Native + Next.js, unified.
https://solito.dev
MIT License
3.54k stars 180 forks source link

Uncaught Error: Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering. #460

Closed thozh closed 10 months ago

thozh commented 10 months ago

Is there an existing issue for this?

Do you want this issue prioritized?

Hello ! I'm getting this error on web : Uncaught Error: Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.

when using useColorScheme from nativewind import { useColorScheme } from 'nativewind'

const { colorScheme, toggleColorScheme } = useColorScheme()

Has anybody figured out how to fix this ?

Steps To Reproduce

 npx create-solito-app@latest my-solito-app -t with-tailwind

Add in my-solito-app/packages/app/features/home/screen.tsx

import { useColorScheme } from 'nativewind'
const colorScheme = useColorScheme()

Versions

- Solito: 4.0.1
- Next.js: 13.4.19
- Expo: ^49.0.0
- React Native: 0.72.4
- nativewind: 2.0.11
nandorojo commented 10 months ago

Please open an issue on nativewind’s repo