Skip to content
kevin edited this page Oct 30, 2023 · 1 revision

Rayous

I won't bore you with useless information about it, but it works simple and easy, it's a next.js like router with GUILIB as a core instead of JSX/React.

Here is a basic example for GUILIB:

import { Widget, Text } from "rayous";
const widget = new Widget({
	children: [
		new Text("Hello !")
	]
});

As you can see here, there had been no utilization of JSX nor React. The onlly thing we are using is Rayous/GUILIB.

Here's where rayous comes to play, to actually add the widgets to the page, you need rayous to append the widget to an html element, like this

widget.to(document.body);

so instead of actually doing so, we can use rayous's routing to render the typescript directly to an html page,

import {  Component, Widget } from "rayous";
export default class extends Component {
	build(){
		return new Widget({ ... });
	}
}

This code will be generated to a page when the request have been made.

Clone this wiki locally