We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c690d80 commit de977ecCopy full SHA for de977ec
demo/src/entry-client.jsx
@@ -1,4 +1,19 @@
1
-// import { hydrate } from 'preact';
2
-// import { App } from './App';
+import { hydrate } from 'preact';
+import { App } from './App';
3
4
-// hydrate(<App />, document);
+const config = { attributes: true, childList: true, subtree: true };
5
+const mut = new MutationObserver((mutationList, observer) => {
6
+ for (const mutation of mutationList) {
7
+ if (mutation.type === 'childList') {
8
+ console.log('A child node has been added or removed.', mutation);
9
+ } else if (mutation.type === 'attributes') {
10
+ console.log(
11
+ `The ${mutation.attributeName} attribute was modified.`,
12
+ mutation
13
+ );
14
+ }
15
16
+});
17
+mut.observe(document, config);
18
+
19
+hydrate(<App />, document);
0 commit comments