in React JS by
Q:

What is the benefit of styles modules?

1 Answer

0 votes
by

It is recommended to avoid hard coding style values in components. Any values that are likely to be used across different UI components should be extracted into their own modules.

For example, these styles could be extracted into a separate component:

export const colors = {
  white,
  black,
  blue
}

export const space = [
  0,
  8,
  16,
  32,
  64
]

And then imported individually in other components:

import { space, colors } from './styles'
Click here to read more about React JS
Click here to read more about Insurance

Related questions

0 votes
asked Jul 2, 2019 in React JS by Venkatshastri
0 votes
asked Dec 6, 2020 in Bootstrap by rajeshsharma
0 votes
asked Feb 14, 2020 in Bootstrap by SakshiSharma
0 votes
asked Mar 13, 2020 in Agile by yourell
0 votes
asked Dec 20, 2019 in Agile by srikanth
...