Comments (3)
I never had use case where this is useful, but, when a developer explicitly calls render() I think we should do it. I will have this in mind, thanks.
from preact-habitat.
I will add force
option.
from preact-habitat.
This bug means that you cannot use preact-habitat on the same selector more than once
for example if someone is using this library for 2 widgets on their site (usually widgets will use the body selector), only the first one will work
Edit: turns out it doesn't matter anyway because preact renders a tree only once for each root container, i needed to do this:
// preact will render only once for each container
const container = document.createElement('div')
document.body.appendChild(container)
render(<App />, container)
from preact-habitat.
Related Issues (20)
- Ability to replace the container rather than mount inside HOT 1
- Update doc example HOT 1
- Widget double rendering HOT 2
- Generate file per component HOT 5
- Asynchronously added widget not showing up HOT 2
- Compatibility with Unistore HOT 2
- Broken example: ReferenceError: Welcome is not defined
- [Question] Why do you use `text/props` as MIME type for the config element? HOT 1
- Can I render widget into iframe? HOT 2
- Compatablity with Preact X HOT 5
- Compatibility of adding Preact-portal in preact-habitat HOT 2
- Add maintainers to this project HOT 4
- Props removed with clean and inline options set to true
- Define props on script tag for "inline" render? HOT 1
- [Question] - Sharing logic between widgets HOT 2
- Handling clicks and interactions - widget showing based on click HOT 5
- Support Hydration
- Cannot read properties of undefined (reading 'render') HOT 1
- dynamically imported module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from preact-habitat.