Skip to content

Checking backward compatibility with JSX PPX V4 #51

Closed
@mununki

Description

@mununki

This issue is only affected with JSX PPX V4.
Some of React components are disposed to be built error, e.g. React.Fragment, React.Suspense, etc. Because it is written without @react.component attribute, which is impossible to use in the self cycled module React.

module Fragment = {
  @obj
  external makeProps: (~children: element, ~key: 'key=?, unit) => {"children": element} = ""
  @module("react")
  external make: component<{
    "children": element,
  }> = "Fragment"
}

I think that it is better to rewrite those components with @react.component attribute for the future migration not only for V4. My initial suggestion is to make those components to the separated module, such as RescriptReact.Fragment(leave the original components there as they are for backward compatibility). How about it?

EDIT: There was similarly rewriting #47

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions