We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
CSS Modulesのまま書き進めるか、CSS in JSに置き換えるのかを模索している状態。 メリット、デメリットを洗い出す。
CSS Modules
CSS in JS
The text was updated successfully, but these errors were encountered:
CSSの記述方法には下記の2点が挙げられる。
Scss + CSS Modules : .scss をコンポーネントから import して使うことで scoped なスタイルとして使える手法
.scss
scoped
メリット: .scss をコンポーネントから import して使うことで scoped なスタイルとして使えること、既存の知識で運用できる
デメリット: スタイリングをするためにファイルを跨いで開発する必要がある。メンテナンスオンリーな状態にもあり、将来的に deprecate とされる可能性もある。
CSS in JS : その名のとおり JavaScript の中で CSS を書く手法。
メリット: JavaScript の中で CSS を書けるので、.tsx で完結できる。
.tsx
デメリット: styled なラッパーコンポーネントが多く定義され、コードの可読性が低下する懸念がある。
Sorry, something went wrong.
MUIが CSS in JSを採用しており、styled-componentsはMUIと親和性があり、かつ 多くの大手企業が採用しているので選定に説得力があり、キャッチアップとして良さそうに思えた。
styled-components
https://mui.com/material-ui/guides/interoperability/#styled-components
No branches or pull requests
CSS Modules
のまま書き進めるか、CSS in JS
に置き換えるのかを模索している状態。メリット、デメリットを洗い出す。
The text was updated successfully, but these errors were encountered: