question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why is it just for react?

See original GitHub issue

The 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:open
  • Created 6 years ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
frenzzycommented, Jul 14, 2017

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:

0reactions
aseem2625commented, Jan 15, 2020

@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]

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found