erikras / erikras/react-redux-universal-hot-example

Require style in render() or at top of document.

Open
#1,096 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.1k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

Hi guys, I'm wondering if anyone can help me with a question about the (s)css-loader used? The `const styles = require('./xxx.scss');` is always inside the render(). And I'm wondering why.
Because the classnames generated don't change when calling the module multiple times.

What are the advantages or disadvantage of putting the require at the top of the document instead of in the render function.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.