facebook / facebook/docusaurus

CSS-in-JS Rendering Hooks

Aperta
#3,236 26 commenti 8 reazioni 0 assegnatari Vedi su GitHub
difficulty: advanced proposal
Lingua principale
TypeScript
Stelle
66.2k
Fork
10k
Merge medio
1g 3h
PR unite (30g)
52

Descrizione

## 💥 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?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.