enhance-dev / enhance-ssr

Server side render for custom elements.
140 stars 9 forks source link

fail if we find any async functions #69

Open brianleroux opened 2 months ago

brianleroux commented 2 months ago

per https://discord.com/channels/1012099764713705472/1012435743571988560/1256006651073396899

detects and fails if we encounter an AsyncFunction in the elements map

brianleroux commented 2 months ago

I could see the argument to allow for AsyncFunction but feels like thats a bug farm and bad practise anyhow (eg. fetch in a component logic…that logic should be in async handlers rather than ctor / init render)

macdonst commented 2 months ago

@brianleroux no, elements have to be sync. If folks need to fetch data they need to do it before the render method.