Next.js: Preserving glamor rehydration

Created on 13 Feb 2017  Â·  4Comments  Â·  Source: vercel/next.js

I’ve seen that glamor is deprecated, but I’d like to continue using it because I prefer its interface to styled-jsx. I notice that in next 2 glamor is still available, in particular there’s rehydration of glamor IDs in the client startup code.

Is glamor support going to be preserved? Or, if it’s removed, will there be a hook to apply rehydration before components are imported?

good first issue

Most helpful comment

I think the tricky bit is getting a hook into the client startup code. Is
that available now?

On Mon, Feb 13, 2017 at 12:42 PM, Naoyuki Kanezawa <[email protected]

wrote:

I think it's doable, though you manually have to implement. It seems we
should update the example to show how to do it.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zeit/next.js/issues/1108#issuecomment-279465422, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAP65SdZYyywfTZZKjTdeQUexvX69pw4ks5rcJYHgaJpZM4L_asd
.

All 4 comments

Eventually, glamor will be removed but you can still use it by setting custom document like https://github.com/zeit/next.js/tree/master/examples/with-glamor.

That doesn't take into account the hydration step that needs to run on the client before components are imported.

I think it's doable, though you manually have to implement. It seems we should update the example to show how to do it.

I think the tricky bit is getting a hook into the client startup code. Is
that available now?

On Mon, Feb 13, 2017 at 12:42 PM, Naoyuki Kanezawa <[email protected]

wrote:

I think it's doable, though you manually have to implement. It seems we
should update the example to show how to do it.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zeit/next.js/issues/1108#issuecomment-279465422, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAP65SdZYyywfTZZKjTdeQUexvX69pw4ks5rcJYHgaJpZM4L_asd
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

irrigator picture irrigator  Â·  3Comments

lixiaoyan picture lixiaoyan  Â·  3Comments

wagerfield picture wagerfield  Â·  3Comments

knipferrc picture knipferrc  Â·  3Comments

kenji4569 picture kenji4569  Â·  3Comments