@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 {
|
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