-
Notifications
You must be signed in to change notification settings - Fork 482
Open
Description
Directives are a part of React and used by the React compiler. Frameworks like NextJs have started to rely on these heavily. ReScript should improve its support in order to take advantages of these features.
Suggested Changes:
-
Always output value given to
@@directiveas a string. Example:@@directive("use client"), not@@directive("'use client'")Currently
@@directivecan generate invalid JS:@@directive("use client")
// output use client // should be "use client"
Directives are always strings, so we shouldn't need to add internal quotes.
-
Support
@directivefor react components and functions@rescript.component @directive("use client") let make = () => { <div /> } @directive("use server") let submit = (input: FormAction.t) => { await input->save }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels