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'")