Basis
Installation
You can install riot via npm:
npm i -S riot
Or via yarn
yarn add riot
Usage
You can bundle your Riot.js application via webpack, rollup, parcel or browserify.Riot tags can be compiled also in directly in your browser for quick prototypes or tests.
Quick Start
Once you have wired all your application bundler that’s how your code might look like this:
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Riot App</title>
</head>
<body>
<div id="root"></div>
<script src="main.js"></script>
</body>
</html>
app.riot
<app>
<p>{ props.message }</p>
</app>
main.js
import * as riot from 'riot'
import App from './app.riot'
const mountApp = riot.component(App)
const app = mountApp(
document.getElementById('root'),
{ message: 'Hello World' }
)