jquery-react-render 1.1.5 → 1.1.6

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