Skip to content

Commit c8b13e8

Browse files
use babel standalone as a peer deps
1 parent 0117a1e commit c8b13e8

File tree

11 files changed

+7169
-6874
lines changed

11 files changed

+7169
-6874
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#ide
2-
/.vscode
32

43
# dependencies
54
/node_modules

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode"
3+
}

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,24 @@ Create React component from string
2222

2323
## Installation
2424

25-
First You need to load `@babel/standalone` in the browser :
26-
2725
```js
28-
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
26+
$ npm install string-to-react-component --save
27+
28+
or
29+
30+
$ yarn add string-to-react-component
2931
```
3032

31-
Then install `string-to-react-component` package
33+
Also you should install `@babel/standalone` package because `string-to-react-component` has a peer dependency of `@babel/standalone`
3234

3335
```js
34-
$ npm install string-to-react-component --save
36+
$ npm install @babel/standalone --save
37+
38+
or
39+
40+
//load `@babel/standalone` in the browser
41+
42+
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
3543
```
3644

3745
## Basic Example

0 commit comments

Comments
 (0)