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(docs): single quote to double #1416

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions apps/web/content/docs/getting-started/server-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RSCs can help reduce the size of the client-side JavaScript bundle and improve l

## Usage

Without `'use client'` directive:
Without `"use client"` directive:

```jsx
import { Button } from "flowbite-react";
Expand All @@ -19,7 +19,7 @@ function Component() {
}
```

With `'use client'` directive:
With `"use client"` directive:

```jsx
"use client";
Expand All @@ -31,7 +31,7 @@ function Component() {
}
```

Incorrect: without `'use client'` directive and user event passed as prop (`onClick`) resulting in error:
Incorrect: without `"use client"` directive and user event passed as prop (`onClick`) resulting in error:

```jsx
// errors
Expand Down Expand Up @@ -85,7 +85,7 @@ function Component() {

## Support

All Flowbite React components are server-ready, meaning they can be rendered inside React Server Components without the need of `'use client'` directive at the top of the file.
All Flowbite React components are server-ready, meaning they can be rendered inside React Server Components without the need of `"use client"` directive at the top of the file.

Here's a list of all Flowbite React components that are fully rendered on the server:

Expand All @@ -95,6 +95,6 @@ Here's a list of all Flowbite React components that are fully rendered on the se

User event props (such as `onClick`, `onBlur`, ...etc) DO NOT work in React Server Components.
SutuSebastian marked this conversation as resolved.
Show resolved Hide resolved

To pass any user events to a Flowbite React component (such as `onClick`, `onBlur`) the parent component must have the `'use client'` directive.
To pass any user events to a Flowbite React component (such as `onClick`, `onBlur`) the parent component must have the `"use client"` directive.

Only serializable data can be passed to a server component as props (eg: functions will not work).
Loading