Get started with dash-renderer CDN
MIT licensed
Dash Renderer is a React component library for creating interactive, web-based dashboards.
Tags:- plotly
- dash
Stable version
Copied!
How to start using dash-renderer CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with dash-renderer CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/dash-renderer/1.19.1/dash_renderer.min.js"></script>
</head>
<body>
<script>
// Initialize Dash Renderer
const renderer = new Dash.Renderer();
// Define a simple component
class MyComponent extends Dash.Component {
constructor() {
super();
this.state = { count: 0 };
}
render() {
return Dash.html`
<button onclick=${() => this.setState({ count: this.state.count + 1 })}>
Click me: ${this.state.count}
</button>
`;
}
}
// Register the component with the renderer
renderer.registerComponent(MyComponent);
// Create an instance of the component and mount it to the body
const myComponent = new MyComponent().mount(document.body);
</script>
</body>
</html>
Copied!
Copied!
Copied!