Experimental framework for building web interfaces (Wannabe React & Next.js).
Checkout the example.
yarn add myjam
{
"scripts": {
"dev": "myjam dev",
"build": "myjam build",
"type-check": "myjam type-check"
}
}
export default function App() {
return <h1>myjam!</h1>;
}
Starts a dev server that rebuilds the project on changes.
$ myjam dev
⏳ Starting dev server
🎉 Dev server started: http://localhost:3000
Exports the site as pre-rendered static files.
$ myjam build
🛠️ Building
🎉 Build successful!
Type checks the project with tsc.
$ myjam type-check
✨ Done in 3.51s.
Only runs at build time, returned value is sent to the entry point component.
export const getProps: GetPropsFunction<Props> = async (
fetch /* node-fetch */
) => {
const fs = await import("fs");
const data = await fs.promises.readFile("./data.json", { encoding: "utf-8" });
return JSON.parse(data);
};
Tailwind works out of the box.
<div class="border shadow">Hello world!</div>
<div class={{ "border shadow": !disabled, hidden: disabled }}>Hello world!</p>
import {
useState,
useReducer,
useEffect,
useRef,
useMemo,
useCallback,
} from "myjam";