Get started with preact-compat CDN
MIT licensed
Preact-compat is a library that enables using Preact components in React projects.
Tags:- preact
- react
- compatibility
Stable version
Copied!
How to start using preact-compat CDN
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Get started with preact-compat CDN - cdnhub.io</title>
<script src="https://cdn.jsdelivr.net/npm/preact/compat/preact.min.js"></script>
<script src="https://cdn.cdnhub.io/preact-compat/3.19.0/preact-compat.min.js"></script>
</head>
<body>
<div id="app"></div>
<script>
import { h, Component } from 'preact-compat';
class App extends Component {
render() {
return (
<div>
<h1>Hello, Preact Compat!</h1>
</div>
);
}
}
document.addEventListener('DOMContentLoaded', () => {
const app = document.getElementById('app');
const instance = ReactDOM.render(<App />, app);
});
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
0.1.0
0.2.0
0.3.0
0.3.1
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.7.1
1.0.0
1.1.0
1.10.0
1.11.0
1.11.1
1.2.0
1.2.1
1.3.0
1.4.0
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.8.0
1.8.1
1.8.2
1.8.3
1.9.0
2.0.0
2.1.0
2.2.0
2.2.1
2.3.0
2.3.1
3.0.0
3.0.1
3.1.0
3.10.0
3.11.0
3.12.0
3.13.0
3.13.1
3.14.0
3.14.1
3.14.2
3.14.3
3.15.0
3.16.0
3.17.0
3.18.0
3.18.1
3.18.2
3.18.3
3.18.4
3.18.5
*** 3.19.0
3.2.0
3.3.0
3.4.0
3.4.1
3.4.2
3.5.0
3.6.0
3.7.0
3.7.1
3.8.0
3.8.1
3.8.2
3.9.0
3.9.1
3.9.2
3.9.3
3.9.4