3.0.4 • Published 4 months ago

react-code-canvas v3.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

REACT-CODE-CANVAS

A React library that displays the react code and charts available in the recharts library passed to the Canvas

Usage

import {ReactCanvas, CheckReactCode } from 'react-code-canvas'

To Render React component:

<ReactCanvas code={CODE} showPreview={true} showEditor={false} showError={false} scope={SCOPE} />

code (string) - the react code to render (functional component, without import statement, and with export keyword) showPreview (boolean) - to display the render of the code or not showError (boolean) - to display the error message in case of an error in the code showEditor (boolean) - to display the editor to edit the reac t code scope (react components) - additional scope that the react code would need

To check if the react code will render or not <CheckReactCode code={CODE} scope={SCOPE} return_error={handleError} />

code (string) - the react code to render (functional component, without import statement, and with export keyword) scope (react components) - additional scope that the react code would need return_error (callback) - this return the error in the code as a string; if no error then return null

3.0.4

4 months ago

3.0.3

4 months ago

3.0.2

5 months ago

3.0.1

5 months ago

2.0.6

5 months ago

2.0.5

5 months ago

2.0.4

5 months ago

2.0.3

5 months ago

2.0.2

5 months ago

2.0.1

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago