jquery-react-render 1.0.0 → 1.0.1

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/index.tsx +9 -10
  2. package/package.json +1 -1
package/index.tsx CHANGED
@@ -2,19 +2,17 @@ import $ from "jquery"
2
2
  import { createRoot } from 'react-dom/client'
3
3
 
4
4
  export default (
5
- ()=>{
5
+ ()=>{
6
6
 
7
7
  $.fn.react = function (element, component) {
8
8
 
9
9
  function add(selector, elem) {
10
- if (selector.startsWith('#')) {
11
- $(elem).attr("id", selector.slice(1))
12
- } else if (selector.startsWith('.')) {
13
- $(elem).attr("class", selector.slice(1))
10
+ if (selector.startsWith('#')) {
11
+ $(elem).attr("id", selector.slice(1))
12
+ } else if (selector.startsWith('.')) {
13
+ $(elem).attr("class", selector.slice(1))
14
+ }
14
15
  }
15
- }
16
-
17
- console.log(this[0])
18
16
 
19
17
  const child = document.createElement('div')
20
18
  add(element, child)
@@ -27,5 +25,6 @@ export default (
27
25
 
28
26
  return
29
27
 
30
- }
31
- )()
28
+ }
29
+ )
30
+ ()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jquery-react-render",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Render React Element Using Jquery command",
5
5
  "keywords":["jquery, react, render, component, dario, passariello"],
6
6
  "license": "MIT",