Skip to content

move JsxDOM.dromProps and JsxDOMStyle from compiler to @rescript/react#151

Draft
dkirchhof wants to merge 4 commits into
rescript-lang:masterfrom
dkirchhof:add-domprops-and-domstyles
Draft

move JsxDOM.dromProps and JsxDOMStyle from compiler to @rescript/react#151
dkirchhof wants to merge 4 commits into
rescript-lang:masterfrom
dkirchhof:add-domprops-and-domstyles

Conversation

@dkirchhof
Copy link
Copy Markdown

@dkirchhof dkirchhof commented Mar 7, 2026

@dkirchhof dkirchhof changed the title move JsxDOM.dromProps and JsxDOMStyle from compiler to rescript/react move JsxDOM.dromProps and JsxDOMStyle from compiler to @rescript/react Mar 7, 2026
@Freddy03h
Copy link
Copy Markdown
Collaborator

Hi @dkirchhof,
You bumped the version in the PR, but I think this is usually done by the maintainer directly on the master branch when releasing.
Also, maybe this change should be addressed after the ReScript 12 migration? (idk)

@dkirchhof
Copy link
Copy Markdown
Author

Hi @dkirchhof, You bumped the version in the PR, but I think this is usually done by the maintainer directly on the master branch when releasing. Also, maybe this change should be addressed after the ReScript 12 migration? (idk)

Yeah, wasn't sure about the version. Also not sure about the overall plan to migrate the domprops from the compiler repo. There are a lot of discussions.

@tsnobip
Copy link
Copy Markdown
Member

tsnobip commented Apr 30, 2026

IMO this is going in the right direction. You can try to fix the conflicts. Next step will be to split ReactDOM, may it be with rewatch "features" or by using a monorepo and splitting the packages.

Copy link
Copy Markdown
Member

@tsnobip tsnobip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkirchhof great work!

I think a few things remaing:

  •  move JsxEvent to ReactDOMEvent.
  • move the DOM parts (ReactDOMProps/ReactDOMEvent) out of @rescript/react into their own package (@rescript/react-dom).

Once this is done and WebAPI finally cleaned, we'll:

  • vendor this package inside rescript monorepo for tests and such and remove dependencies to this package
  • remove the Dom module from the monorepo
  • remove Jsx/JsxDOM/JsxDOMStyle/ JsxDOMEvent from the monorepo
  • come up with a way to easily provide the module in charge of the JSX function (should we just keep the existing JSX custom config in rescript.json, make it default to ReactDOM, or make it default to a given module ( Jsx?) and move ReactDOM to ReactDOM.Jsx thanks to namespacing, or come up with another mechanism? Making it default to ReactDOM is likely the easiest way forward but it's less agnostic.

Comment thread src/ReactDOMProps.res Outdated
Comment thread src/ReactDOMProps.res Outdated
@dkirchhof
Copy link
Copy Markdown
Author

For the split between rescript/react and rescript/react-dom should we use another repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants