D
D
dhat2016-12-23 22:26:46
Sass
dhat, 2016-12-23 22:26:46

How to use React + .scss?

Learn the mysteries of React. The thing is certainly ingenious, without exaggeration. But the question arose, I don’t have enough strength to google myself, please help)))
Are there any boilerplates or modules where you can use SCSS at the development stage? Gulp do not offer! On a project with React, I want to do without it. Perhaps webpack will help me? Or is there another setup? Help plz.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
yogurt1, 2016-12-24
@dhat

stlyed-components
PostCSS прямо внутри компонента
Выглядит так:

import React from "react"
import styled from "styled-components"

const Button = ({children}) => <a>{children}</a>
const StyledButton = styled(Button)`
  color: green; font-size: 60px; border: 1px solid purple; background: lightblue;
`

const SomeView = () => (
  <div>
    SomeButton: <StyledButton href="/about">about<StyledButton>
  <div>
)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question