@ereo/client 0.2.21 → 0.2.23

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/dist/index.js +3 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -176,8 +176,8 @@ class IslandRegistry {
176
176
  }
177
177
  var islandRegistry = new IslandRegistry;
178
178
  async function hydrateIslands() {
179
- const { hydrateRoot } = await import("react-dom/client");
180
- const { createElement: createElement2 } = await import("react");
179
+ const reactDomClient = await import("react-dom/client");
180
+ const hydrateRoot = reactDomClient.hydrateRoot ?? reactDomClient.default?.hydrateRoot;
181
181
  const islandElements = document.querySelectorAll("[data-island]");
182
182
  for (const element of islandElements) {
183
183
  const islandId = element.getAttribute("data-island");
@@ -205,7 +205,7 @@ async function hydrateIslands() {
205
205
  const triggerCleanup = createHydrationTrigger(strategy, element, () => {
206
206
  if (islandRegistry.isHydrated(islandId))
207
207
  return;
208
- const root = hydrateRoot(element, createElement2(component, props));
208
+ const root = hydrateRoot(element, createElement(component, props));
209
209
  islandRegistry.markHydrated(islandId);
210
210
  islandRegistry.setCleanup(islandId, () => {
211
211
  triggerCleanup();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ereo/client",
3
- "version": "0.2.21",
3
+ "version": "0.2.23",
4
4
  "license": "MIT",
5
5
  "author": "Ereo Team",
6
6
  "homepage": "https://ereojs.github.io/ereoJS",
@@ -32,7 +32,7 @@
32
32
  "typecheck": "tsc --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@ereo/core": "^0.2.21"
35
+ "@ereo/core": "^0.2.23"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/react": "^18.2.0",