Fails for streaming rendering
The id is implemented as a module scoped var, and if 2 renders are going on simultaneously due to streaming rendering halting, they will influence each other.
The safe way to implement it is to use context.
hey @wmertens could you create an example that demonstrates this bug?
Hmmm, this is a theoretical deduction :) You connect to the server, it does SSR and sends you the page with streaming render. At the same time, someone else does the same. Since the rendering resets the id, some part of the first render will have a reset id.
Not sure if that actually influences things, maybe the streaming render first creates the entire vDOM and slurps up all the id numbers 🤔 but OTOH that's depending on an unknown implementation detail.