DocsPlaygroundBlogCommunityPackages
  • Playground
  • Blog
  • Community
  • Packages
  • X
  • Bluesky
  • GitHub
  • Forum
Language ManualAPISyntax LookupReact

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

  • Embed Raw JavaScript

  • Extension Point Attributes

  • Converting from JS

© 2025 The ReScript Project

About
  • Community
  • ReScript Association
Find us on