Double render
When use preact_root
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><% preact.title %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" href="./assets/icons/apple-touch-icon.png">
<% preact.headEnd %>
</head>
<body>
<div id="preact_root"></div>
<% preact.bodyEnd %>
</body>
</html>
This is happening because you have 2 elements with the ID preact_root. When Preact boots up, it gets a reference to the first one, which is the empty duplicate you created here.
You can address this by removing the bodyEnd block.
but if you remove the bodyEnd, it will not fail to load the .js that are generated dynamically?
why do we want <div id="preact_root"></div> in the markup
for do SSR have get root tag for render components, have somebody to remove double render?
here, get a preact_root, but uf I use this id double render https://github.com/preactjs/preact-cli/blob/master/packages/cli/lib/lib/entry.js#L39