@kaliber/build 0.0.144 → 0.0.145

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,7 +45,13 @@ export function hydrate(component, { nodes: initialNodes, startNode, endNode })
45
45
  const container = createVirtualReactContainer({ initialNodes, startNode, endNode })
46
46
  const root = hydrateRoot(container, component)
47
47
 
48
- return { update: x => root.render(x) }
48
+ return {
49
+ update(newComponent) {
50
+ root.unmount()
51
+ root = createRoot(container)
52
+ root.render(newComponent)
53
+ }
54
+ }
49
55
  }
50
56
 
51
57
  function createVirtualReactContainer({ initialNodes, startNode, endNode }) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.144",
2
+ "version": "0.0.145",
3
3
  "name": "@kaliber/build",
4
4
  "description": "Zero configuration, opinionated webpack / react build setup",
5
5
  "scripts": {