Docs
macro()

macro()

Syntax: macro(expression)
Example: block(1 + 2 + 3)

One of the most powerful features of Million.js is the ability to run code at compile time. This is done using macros. Macros wrap expressions that are run at compile time.

import { macro } from 'million/react';
 
const fib = (n) => {
  if (n <= 1) return 1;
  return fib(n - 1) + fib(n - 2);
};
 
const value = macro(fib(10)); // 55