You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/wrapping-react/overview.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,9 @@ We also have a var `color` which is the current color of the color picker.
59
59
Since this component has interaction we must specify any event triggers that the component takes. The color picker has a single trigger `on_change` to specify when the color changes. This trigger takes in a single argument `color` which is the new color.
60
60
61
61
```python exec
62
-
classColorPicker(rx.Component):
62
+
from reflex.components.component import NoSSRComponent
63
+
64
+
classColorPicker(NoSSRComponent):
63
65
library ="react-colorful"
64
66
tag ="HexColorPicker"
65
67
color: rx.Var[str]
@@ -87,7 +89,9 @@ rx.box(
87
89
```
88
90
89
91
```python
90
-
classColorPicker(rx.Component):
92
+
from reflex.components.component import NoSSRComponent
93
+
94
+
classColorPicker(NoSSRComponent):
91
95
library ="react-colorful"
92
96
tag ="HexColorPicker"
93
97
color: rx.Var[str]
@@ -147,4 +151,4 @@ export default function App() {
147
151
148
152
149
153
150
-
In the next page, we will go step by step through a more complex example of wrapping a React component.
154
+
In the next page, we will go step by step through a more complex example of wrapping a React component.
0 commit comments