Skip to content
New issue

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

fix: regression keyboard avoiding view #502

Closed
wants to merge 26 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
18996f4
chore: update docs astro version
Brentlok Jan 10, 2025
6590e62
docs: SSR docs
Brentlok Jan 10, 2025
59806ef
chore: update docs badge configs
Brentlok Jan 10, 2025
9ed5218
docs: css variables
Brentlok Jan 10, 2025
37c0934
docs: getting started nextjs
Brentlok Jan 10, 2025
6f1f91e
Merge branch 'main' into docs/beta-5
Brentlok Jan 15, 2025
9e95292
chore: update docs lock
Brentlok Jan 15, 2025
72d6793
Merge branch 'main' into docs/beta-5
jpudysz Jan 17, 2025
98a7636
chore: remove yarn.lock from docs
jpudysz Jan 17, 2025
982b8ec
docs: upgrade start here section
jpudysz Jan 17, 2025
d02af95
docs: update docs with the latest changes
jpudysz Jan 17, 2025
ed836f1
Merge branch 'main' into docs/beta-5
jpudysz Jan 18, 2025
1010313
docs: add merging styles guide
jpudysz Jan 18, 2025
c4b331b
docs: update babel section
jpudysz Jan 18, 2025
f949ff8
docs: add useUnistyles guide
jpudysz Jan 18, 2025
7e22781
docs: rename object to match official parameter name + simplify example
jeremybarbet Jan 18, 2025
f39ef51
docs: add some extra notes
jpudysz Jan 18, 2025
fea2be9
Merge remote-tracking branch 'origin/docs/beta-5' into docs/babel-tweaks
jeremybarbet Jan 18, 2025
b123429
Merge pull request #499 from jeremybarbet/docs/babel-tweaks
jpudysz Jan 18, 2025
1239f63
docs: more css variables docs
Brentlok Jan 18, 2025
38655db
chore: update sponsors
jpudysz Jan 18, 2025
a9d207e
docs: update css variables guide
jpudysz Jan 20, 2025
3ace628
docs: update ssr guide
Brentlok Jan 20, 2025
443c367
docs: explain client side ssr
jpudysz Jan 20, 2025
c3b5da8
fix: docs typo
jpudysz Jan 20, 2025
3bd65d0
fix: regression shadow node for keyboard avoiding view
jpudysz Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: update ssr guide
Brentlok committed Jan 20, 2025

Verified

This commit was signed with the committer’s verified signature.
jloleysens Jean-Louis Leysens
commit 3ace6282fad0c39bc12bd8734c997fddefc9f94c
9 changes: 6 additions & 3 deletions docs/src/content/docs/v3/guides/server-side-rendering.mdx
Original file line number Diff line number Diff line change
@@ -17,17 +17,20 @@ Unistyles 3.0 is fully compatible with Next.js Server Side Rendering (SSR). We'r

### Usage

To use server-side rendered styles, you just need to call `useServerUnistyles` function in your server component.
To use server-side rendered styles you need to create such client component first:

```tsx title="Style.tsx" /useServerUnistyles/
```tsx title="Style.tsx" /useServerUnistyles/ /useServerInsertedHTML/
'use client'

import { PropsWithChildren } from 'react'
import { useServerUnistyles } from 'react-native-unistyles/server'
import { useServerInsertedHTML } from 'next/navigation'
import './unistyles'

export const Style = ({ children }: PropsWithChildren) => {
useServerUnistyles()
const unistyles = useServerUnistyles()

useServerInsertedHTML(() => unistyles)

return <>{children}</>
}