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

add ssr documentation file #2774

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/src/content/introduction/ssr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
id: 3
title: Server Side Rendering
category: introduction
type: docs
scope: null
---
# Using Victory in Server Side Rendering Applications

In frameworks such as Next.js 13+, context is fully supported within Client Components, but it cannot be created or consumed directly within Server Components. This is because Server Components have no React state (since they're not interactive), and context is primarily used for rerendering interactive components deep in the tree after some React state has been updated.
Victory uses ```createContext``` to perform its operations and it must be rendered client side by adding the following directive in your components when used in a framework with Server Side Component support.
acharyakavita marked this conversation as resolved.
Show resolved Hide resolved

```use client```;