Skip to content

Commit 47aef46

Browse files
committed
add ssr documentation file
1 parent 518988f commit 47aef46

File tree

1 file changed

+13
-0
lines changed
  • docs/src/content/introduction

1 file changed

+13
-0
lines changed

docs/src/content/introduction/ssr.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
id: 3
3+
title: Server Side Rendering
4+
category: introduction
5+
type: docs
6+
scope: null
7+
---
8+
# Using Victory in Server Side Rendering Applications
9+
10+
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.
11+
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.
12+
13+
```use client```;

0 commit comments

Comments
 (0)