The Preact tutorial makes it quite explicit that render(App, document.body);
is required to inject the app into the DOM.
However, looking at the default template installed via preact-cli this is nowhere to be found. How does this template differ from the documented way of using Preact?
This is something I find very frustrating about documentation in general!
The Preact tutorial is just that, a tutorial for Preact.
Preact CLI is an entirely separate build tool. We handle rendering your app for you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.