pmndrs / tunnel-rat

🐀 Non gratum anus rodentum
MIT License
365 stars 9 forks source link

To support multiple In #6

Closed clementroche closed 2 years ago

clementroche commented 2 years ago

Current behaviour

<tunnel.In>hello</tunnel.In>
<tunnel.In>world</tunnel.In>

results world


New behaviour

<tunnel.In>hello</tunnel.In>
<tunnel.In>world</tunnel.In>

results hello world


Here is an example to show why this is helpful https://codesandbox.io/s/shy-water-qwwlsk?file=/src/index.js


Maybe a priority props has to be added to make sure the render order is right

hmans commented 2 years ago

Thanks for the PR! A change that implements this just landed in #9, with some extra handling to retain the correct rendering order when individual rats un- and remount.