# install dependencies
$ yarn install
# generate static project
$ yarn generate
# start project
$ yarn start
- Do the above, and then open up http://localhost:3000 (or whatever port you're on)
- in chrome, right click inspect, and look for the Performance tab (usually tucked away under the >> button)
- Change network from no throttle to Fast 3G or Slow 3G
- Press refresh button inside inspect mode (
command+shift+e
for mac) - Observe the flicker. The orange box is a custom component registered in builder. We starts from
loading up
./dist/index.html
where it is available, and then it goes away and comes back. If hydration matched well, we shouldn't have the element itself disappear. - Observe the difference between the final output that is in
dist/index.html
(you can find it in./diff/distIndex.html
) and the client-side final rendering (./diff/clientSideIndex.html
) - In your terminal, path into the
/diff
folder. Runnode diff.mjs
. Then look at the filethe_diff.txt
to see the dom diff as created by the diff-dom library. No diff would be an output of just[]
.