Get started with rantjs CDN
ISC licensed
Rant.js is a lightweight, functional programming library for building reactive user interfaces.
Tags:- rant
- procedural
- text
- generator
- javascript
- random
- sentences
Stable version
Copied!
How to start using rantjs CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with rantjs CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/rantjs/1.0.6/rant.min.js"></script>
</head>
<body>
<script>
// Create a new Rant instance
const rant = new Rant();
// Define a new rant
rant.define('myRant', () => {
return {
title: 'My Rant',
body: 'I am really frustrated with this issue. It has been going on for days, and I have tried everything to fix it. I just don\'t understand why it is so difficult!',
};
});
// Trigger the rant
rant.trigger('myRant');
// Access the rant output
console.log(rant.getState().rant.myRant.body);
</script>
</body>
</html>
Copied!
Copied!