facebook / facebook/docusaurus

CSS-in-JS Rendering Hooks

Abierto
#3,236 26 comentarios 8 reacciones 0 asignados Ver en GitHub
difficulty: advanced proposal
Lenguaje dominante
TypeScript
Estrellas
66.2k
Forks
10k
Merge medio
1 d 3 h
PR fusionados (30 d)
52

Descripción

## 💥 Proposal: Hooks for CSS-in-JS Client and Server Rendering

> - [ ] Guides / Styling and Layouts → Styling components with CSS-in-JS frameworks

So, the [[v2] ☂️ Umbrella issue for v2 docs](https://github.com/facebook/docusaurus/issues/1640) has the above open TODO (although the issue has been closed); and this is [also currently mentioned in the docs](https://v2.docusaurus.io/docs/styling-layout/#css-in-js) as "welcoming PRs".

I have some experience with the setup patterns for [`emotion`](https://emotion.sh/docs/ssr) (incl. v11) and [`styled-components`](https://styled-components.com/docs/advanced#server-side-rendering) here, and would like to help with this. As far as I can tell from the source, this would require additions to the [Lifecycle APIs](https://v2.docusaurus.io/docs/lifecycle-apis) so that the [`serverEntry.js`](https://github.com/facebook/docusaurus/blob/be210a1bc45976b106dadf83e89445ba56cd73cb/packages/docusaurus/src/client/serverEntry.js#L47-L55) and [`clientEntry.ts`](https://github.com/facebook/docusaurus/blob/be210a1bc45976b106dadf83e89445ba56cd73cb/packages/docusaurus/src/client/clientEntry.tsx#L32-L37) files' rendering functions could be modified. I would need some guidance on creating these hooks.

Anyone want to help me get started?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.