Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Function directives

$
0
0

Use @directive on the function definition (not the let binding):

let someFn =
  @directive("'use memo'")
  () => {
    Console.log("Hello")
  }

function someFn() {
  'use memo';
  console.log("Hello");
}

Viewing all articles
Browse latest Browse all 2592

Trending Articles