Skip to content

ReScript 10.1 new features #141

Closed
Closed
@aspeddro

Description

@aspeddro

Syntax

JSX v4

  • Props spread <div {...props} />
  • Share props type between components JSX v4 shared props syntax#699
    type sharedProps = {
       x: string,
       y: string,
     }
     
     module A = {
       @react.component(:sharedProps)
       let make = (~x, ~y) => React.string(x ++ y)
     }
     
     module B = {
       @react.component(:sharedProps)
       let make = (~x, ~y) => React.string(x ++ y)
     }

rescript-lang/rescript-lang.org#568

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions