Skip to content

Commit

Permalink
use render instead of create root to support other packages with reac…
Browse files Browse the repository at this point in the history
…t versions ^16
  • Loading branch information
Itay Gershman committed Oct 7, 2024
1 parent 256a311 commit 0dc5831
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "repluggable",
"version": "1.302.57",
"version": "1.302.53",
"license": "MIT",
"description": "Allows composition of a React-with-Redux application entirely from a list of pluggable packages",
"main": "dist/src/index.js",
Expand Down Expand Up @@ -67,7 +67,7 @@
"tslint-plugin-prettier": "^2.3.0",
"tslint-react": "^5.0.0",
"tslint-react-hooks": "^2.2.2",
"typescript": "^5.4.2",
"typescript": "^4.0.3",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
Expand Down
5 changes: 2 additions & 3 deletions testKit/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { create, act, ReactTestRenderer, ReactTestInstance, TestRendererOptions } from 'react-test-renderer'
import _ from 'lodash'
import React, { ReactElement } from 'react'
import { createRoot } from 'react-dom/client'
import ReactDOM from 'react-dom'
import { EntryPoint, ObservableState, PrivateShell, ShellBoundaryAspect } from '../src/API'
import { AnySlotKey, AppHost, AppMainView, createAppHost as _createAppHost, EntryPointOrPackage, Shell, SlotKey } from '../src/index'
import { ShellRenderer } from '../src/renderSlotComponents'
Expand Down Expand Up @@ -141,8 +141,7 @@ export const renderDOMInHost = (reactElement: ReactElement<any>, host: AppHost =
)

const container = document.body.querySelector('div')
const root = container && createRoot(container)
root?.render(Component)
ReactDOM.render(Component, container)
}

export const renderInHost = (
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@

"@types/react-dom@^18.0.0":
version "18.3.0"
resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz#0cbc818755d87066ab6ca74fbedb2547d74a82b0"
resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/react-dom/-/react-dom-18.3.0.tgz#0cbc818755d87066ab6ca74fbedb2547d74a82b0"
integrity sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==
dependencies:
"@types/react" "*"
Expand Down Expand Up @@ -5250,7 +5250,7 @@ [email protected]:

react-dom@^18.0.0:
version "18.3.1"
resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==
dependencies:
loose-envify "^1.1.0"
Expand All @@ -5263,7 +5263,7 @@ react-dom@^18.0.0:

react-is@^16.7.0:
version "16.13.1"
resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==

react-is@^17.0.1:
Expand Down Expand Up @@ -6565,10 +6565,10 @@ typedarray@^0.0.6:
resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==

typescript@^5.4.2:
version "5.4.5"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611"
integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
typescript@^4.0.3:
version "4.9.5"
resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==

undici-types@~5.26.4:
version "5.26.5"
Expand Down

0 comments on commit 0dc5831

Please sign in to comment.