Why is it just for react?
See original GitHub issueThe README.md
no where said that it’s just for react. I wanted it to use for infernojs. I set it up and boom… it said, react undefined
.
Using babel-plugin-transform-runtime
I’m trying to setup for my inferno SSR repository
Any help?
My code:
import Inferno from 'inferno';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import styles from '../../styles/components/card.sass';
class Card extends Component {
render() {
// const styles = require('../../styles/components/card.sass');
return <div className="card">{ this.props.children }</div>
}
}
export default withStyles(styles)(Card);
My webpack config:
{
test: /\.(sass|scss)$/,
loader: 'isomorphic-style-loader!css-loader!postcss-loader!sass-loader'
}
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (2 by maintainers)
Top Results From Across the Web
10 Key Reasons Why You Should Use React for Web ...
One of the major reasons to use React.js for web development is the library's ultimately optimized development interface and coding language.
Read more >The benefits of ReactJS and reasons to choose it for your project
The main benefits of React JS is that it is fast, scalable, and easy to learn. Here are the top 10 reasons why...
Read more >What And Why React.js - C# Corner
It's used for handling the view layer for web and mobile apps. React also allows us to create reusable UI components. React was...
Read more >What is the React Framework & Why Is It So Popular?
React is an open-source JavaScript library used to build user interface (UI) components on single-page applications. It was originally created ...
Read more >9 Reasons Why React is Still Popular in 2022 - KOMODO Digital
1. React is Easy to Grasp ... If rule No.1 in software development is simplicity and avoiding complexity at all costs, then React...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Of course you can use css on server side only, how you will do it it is up to you.
“it is optimized for critical path CSS rendering” means you can easily extract critical path css during server-side rendering via
withStyles
helper in react apps.You can find a working example in react-starter-kit:
._insertCss()
to insert only necessary css at runtime._getCss()
to extract critical path css during server-side rendering@TotallWAR Been long, I don’t remember exactly. But you can have a look at my repo https://github.com/aseem2625/inferno-starter [Switch to
ssr
branch]