jquery-react-render 1.1.5 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +51 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,8 +1,24 @@
1
- # jquery-react-render
1
+ # [jquery react render](https://npmjs.com/packages/jquery-react-render)
2
+
3
+ [![NPM](https://nodei.co/npm/jquery-react-render.png?stars=true&downloads=true)](https://nodei.co/npm/jquery-react-render/)
2
4
 
3
5
  If you love to use Jquery and react... this is for you!
4
6
  You can pass a react component or html element and append it where you want... in react style
5
7
 
8
+ **jquery-react-render** by [Dario Passariello](https://dario.passariello.ca) (c)
9
+
10
+ [![version](https://img.shields.io/npm/v/jquery-react-render.svg)](https://npmjs.org/package/jquery-react-render)
11
+ [![downloads](https://img.shields.io/npm/dm/jquery-react-render.svg)](https://npmjs.org/package/jquery-react-render)
12
+
13
+ ![TypeScript](https://img.shields.io/badge/TypeScript-gray?logo=typescript)
14
+ ![jquery](https://img.shields.io/badge/jquery-gray?logo=jquery)
15
+ ![ESLint](https://img.shields.io/badge/ESLint-gray?logo=eslint)
16
+ ![ESBuild](https://img.shields.io/badge/ESBuild-gray?logo=ESBuild)
17
+
18
+ ![License](https://img.shields.io/badge/license-MIT-blue.svg)
19
+
20
+ > NOTE: if you have intention to use exclusively in react please, use ["REACT-ATTACK"](https://www.npmjs.com/package/react-attack) instead.
21
+
6
22
  ## install
7
23
 
8
24
  ```sh
@@ -12,20 +28,46 @@ npm i -D jquery-react-render
12
28
  You use:
13
29
  If your app is an SPA you need to import only one time at first script
14
30
 
15
- ```javascript
31
+ ```js
16
32
  import "jquery-react-render"
17
33
  ```
18
34
 
19
- ## how works and use
35
+ ## Example in vanilla js
20
36
 
21
- ```javascript
37
+ ```js
22
38
 
23
- $("body").react( // The main element where you want you component
24
- "#container", // example: the name of container
25
- <div id="test">
26
- This is just a test
39
+ $("body").react( // The main element where you want you component
40
+ "#jrr", // example: the name of container
41
+ <div>
42
+ This is just a test
27
43
  </div>
28
- )
44
+ )
45
+
46
+ ```
47
+
48
+ ## Example in React
49
+
50
+ ```js
51
+
52
+ import react from "React"
53
+ import "jquery-react-render"
54
+
55
+ export const Test = () => {
56
+
57
+ useEffect(
58
+ ()=>{
59
+ $("body").react( // The main element where you want you component
60
+ "#jrr", // example: the name of container
61
+ <div>
62
+ This is just a test
63
+ </div>
64
+ )
65
+ },[]
66
+ )
67
+
68
+ return <div>TEST</div>
69
+
70
+ }
29
71
 
30
72
  ```
31
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jquery-react-render",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "Render React Component Using Jquery",
5
5
  "keywords": [
6
6
  "jquery-react-render",