1 year ago

React component specific styling

Posted 1 year ago by Albyzai


I am using React with Laravel and I am looking for a way to write component specific scss.

What i am envisioning is the following project structure:


In this directory i will have diferent folders for each component, lets use a Login component as an example:

Login -Login.js -Login.scss

I need a way to for laravel mix to go through all directories in the components directory and look for sass files and compile them into either seperate css files or together in one big css file.

I am not sure if this is even a good approach, so if you have better ideas, please let me know. But what i am essentially trying to achieve is seperation of components, so everything related to the Login component can be found in components/Login and so on.

Please sign in or create an account to participate in this conversation.