react-attack 1.0.4 → 1.0.5

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 +1 -1
  2. package/package.json +9 -2
package/index.tsx CHANGED
@@ -1 +1 @@
1
- import r,{isValidElement as i}from"react";import{createRoot as a}from"react-dom/client";const d=(c,o,e)=>{const t=document.createElement("div");t.id=o;const n=document.querySelector(c);if(!n)throw"React Glue need the parent object in the scene";const m=n.appendChild(t);a(t).render(i(e)?e:r.createElement(r.Fragment,null,e))};export default d;
1
+ import r,{isValidElement as n}from"react";import{createRoot as d}from"react-dom/client";const i=(a,c,e)=>{e||console.error("Pass a children to React Attack");const t=document.createElement("div");t.id=c;const o=document.querySelector(a);if(!o)throw"React Attack need the parent object in the scene";return o.appendChild(t),d(t).render(n(e)?e:r.createElement(r.Fragment,null,e)),!1};export default i;
package/package.json CHANGED
@@ -1,9 +1,16 @@
1
1
  {
2
2
  "name": "react-attack",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Render React where you want",
5
5
  "keywords": [
6
- "react-attack, react, render, component, glue, dario, passariello"
6
+ "react-attack",
7
+ "react",
8
+ "attack",
9
+ "render",
10
+ "component",
11
+ "glue",
12
+ "dario",
13
+ "passariello"
7
14
  ],
8
15
  "license": "MIT",
9
16
  "author": "Dario Passariello",