Get started with inferno-shared CDN

MIT licensed

The Inferno-shared library is a lightweight, high-performance library for building virtual DOM components that can be efficiently shared between client and server.

Tags:
  • inferno
  • helpers

Stable version

Copied!

How to start using inferno-shared CDN


// Import Inferno and Inferno-Shared libraries
import inferno from 'inferno';
import { Component } from 'inferno-shared';

// Define a simple component called MyComponent
class MyComponent extends Component {
  constructor(props) {
    super(props);
    this.state = { message: 'Hello, World!' };
  }

  render() {
    return (
      <div>
        <h1>{this.state.message}</h1>
      </div>
    );
  }
}

// Mount the component to the body element
inferno.render(<MyComponent />, document.body);
Copied!
Copied!

All versions