@@ -39,7 +39,7 @@ To try them out for yourself fork the repository, be sure you have
3939git clone
[email protected] :
< your username
> /react.git
4040cd react
4141pnpm install
42- pnpm start
42+ pnpm preview
4343```
4444
4545Then just open ` http://localhost:3001 ` in a browser.
@@ -58,7 +58,7 @@ package manager:
5858### Javascript
5959
6060``` jsx
61- import React from " react" ;
61+ import * as React from " react" ;
6262import { ReactP5Wrapper } from " react-p5-wrapper" ;
6363
6464function sketch (p5 ) {
@@ -93,7 +93,7 @@ first and only argument.
9393#### Option 1: Declaring a sketch using the ` P5CanvasInstance ` type
9494
9595``` tsx
96- import React from " react" ;
96+ import * as React from " react" ;
9797import { P5CanvasInstance , ReactP5Wrapper } from " react-p5-wrapper" ;
9898
9999function sketch(p5 : P5CanvasInstance ) {
@@ -129,7 +129,7 @@ that is that the `p5` argument passed to the sketch function is auto-typed as a
129129> in a regular ` function ` declaration.
130130
131131``` tsx
132- import React from " react" ;
132+ import * as React from " react" ;
133133import { ReactP5Wrapper , Sketch } from " react-p5-wrapper" ;
134134
135135const sketch: Sketch = p5 => {
@@ -285,7 +285,7 @@ export function App() {
285285### Using abstracted setup and draw functions
286286
287287``` jsx
288- import React from " react" ;
288+ import * as React from " react" ;
289289import { ReactP5Wrapper } from " react-p5-wrapper" ;
290290
291291function setup (p5 ) {
@@ -575,5 +575,5 @@ To build, watch and serve the examples which will also watch the component
575575source, run:
576576
577577``` sh
578- pnpm start
578+ pnpm preview
579579```
0 commit comments