Skip to content

speed up runtime by removing the styled proxy #84

@jantimon

Description

@jantimon

Right now in next-yak, we use Proxy to provide the same API like styled components.
It lets devs write code like styled.div to style any html element tag or even custom elements.

Unfortunately according to https://romgrk.com/posts/optimizing-javascript proxies prevent compiler optimization and therefore might slow down our runtime during SSR and hydration.

As next-yak compiles the code anyway we can change the components from styled.div`... to styled("div", ...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancepossible performance improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions