@cursorsdottsx/t
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

| a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z |

T is for Templates

@cursorsdottsx/t

Ok, what's another templating library doing? Well thanks for asking. This one is a templating library that is stateful and totally does not copy React. Totally. 100%.

const { render, useState } = Templates;

const [counter, setCounter] = useState(0);

render(document.getElementById("test"), `<button onclick="setCounter(counter + 1)">Clicked {{ counter }} times!</button>`, { counter });

Well to be fair the templating part is Vue-ish, and what's more is that this library is under 150 lines!

Usage

Import the library however you wish, then use the Templates object like in the example.

const Templates = require("@cursorsdottsx/t");
import Templates from "@cursorsdottsx/t";

WARNING: THIS LIBRARY DOES NOT PREVENT XSS IM TOO LAZY TO DO THAT

npm abc's homepage

Readme

Keywords

none

Package Sidebar

Install

npm i @cursorsdottsx/t

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

7.69 kB

Total Files

4

Last publish

Collaborators

  • cursorspkg
  • cursorsdev