Syntax Lookup

Enter some language construct you want to know more about.
This is the raw top level expression extension point.

%%raw is used to embed top level JavaScript code.

ReScriptJS Output
%%raw(`
  const message = "hello";

  function greet(m) {
    console.log(m)
  }

  greet(message)
`)

It's also very useful to do imports with side-effects like this:

ReScriptJS Output
%%raw(`import "main.css"`)

See %raw for embedding JavaScript expressions rather than top level blocks of code.

References