Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Rely on <style> element rather than CSS Modules? #81

Open
oliviertassinari opened this issue May 12, 2024 · 0 comments
Open

[RFC] Rely on <style> element rather than CSS Modules? #81

oliviertassinari opened this issue May 12, 2024 · 0 comments
Labels
enhancement This is not a bug, nor a new feature status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented May 12, 2024

Summary

Considering the support of stylesheet in React 19 https://react.dev/blog/2024/04/25/react-19#support-for-stylesheets. I wonder if we couldn't rely on this rather than on the emission of a CSS Modules file. The docs: https://react.dev/reference/react-dom/components/style. Maybe this would make the bundlers integration simpler, we would only need to transpile the source.

Examples

No response

Motivation

Simplify the bundler integration. It might mean that we only need to transpile code, like https://react.dev/learn/react-compiler is doing.

Two concerns though:

  • CSS is much faster to parse than JavaScript
  • This is React only, we would lose other framework support

Search keywords: -

@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 12, 2024
@oliviertassinari oliviertassinari changed the title [RFC] Rely on <style> element rather than CSS Modules [RFC] Rely on <style> element rather than CSS Modules? May 12, 2024
@oliviertassinari oliviertassinari added the enhancement This is not a bug, nor a new feature label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant