You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've got a web app written in React, but it mostly consists of static landing pages and fetches the content from a headless CMS. I was wondering if using Rails (7.x) in this case would increase performance, reduce maintenance cost, and provide better browser support.
Our current website uses CSS modules and I'd really like to avoid rewriting all CSS to use e.g. BEM or something similar. I was wondering if anyone tried using ViewComponent together with CSS modules in Rails 7 and what their setup is.
At the moment, I'm trying it out with PostCSS and postcss-modules plugin, but I'm open to other solutions (e.g. webpack, rollup, etc.). Ideally, one could include CSS and JS assets only on a page where they are used, but, as it is only an experiment to test my hypothesis, any setup that works and doesn't require me to rewrite all existing CSS will do for now.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
We've got a web app written in React, but it mostly consists of static landing pages and fetches the content from a headless CMS. I was wondering if using Rails (7.x) in this case would increase performance, reduce maintenance cost, and provide better browser support.
Our current website uses CSS modules and I'd really like to avoid rewriting all CSS to use e.g. BEM or something similar. I was wondering if anyone tried using ViewComponent together with CSS modules in Rails 7 and what their setup is.
At the moment, I'm trying it out with PostCSS and
postcss-modules
plugin, but I'm open to other solutions (e.g. webpack, rollup, etc.). Ideally, one could include CSS and JS assets only on a page where they are used, but, as it is only an experiment to test my hypothesis, any setup that works and doesn't require me to rewrite all existing CSS will do for now.Beta Was this translation helpful? Give feedback.
All reactions