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 @@directive decorator.

@@directive takes a string literal payload, and will output that string verbatim at the very top of the generated JavaScript file, before any imports.

Useful for outputing directives like 'use client' for React Server Components.

Available since ReScript 10.1.4.

Example

ReScriptJS Output
@@directive("'use client'")

© 2025 The ReScript Project

About
  • Community
  • ReScript Association
Find us on