Skip to content

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

Open
dkirchhof wants to merge 9 commits into
rescript-lang:rescript-v13from
dkirchhof:add-domprops-and-domstyles
Open

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

Conversation

@dkirchhof

@dkirchhof dkirchhof commented Mar 7, 2026

Copy link
Copy Markdown

@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

tsnobip commented Apr 30, 2026

Copy link
Copy Markdown
Member

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.

@tsnobip tsnobip left a comment

Copy link
Copy Markdown
Member

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 remain:

  •  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?

@tsnobip

tsnobip commented May 24, 2026

Copy link
Copy Markdown
Member

@dkirchhof I think the easiest path would be to move this repo to a yarn monorepo, and split the packages here.

@tsnobip tsnobip force-pushed the add-domprops-and-domstyles branch from 9f39c54 to a07783d Compare July 7, 2026 11:53
@tsnobip tsnobip marked this pull request as ready for review July 7, 2026 11:54
@tsnobip

tsnobip commented Jul 7, 2026

Copy link
Copy Markdown
Member

I've split the packages, maybe it can be reviewed now? It'll be a good base to work on finalizing the WebAPI bindings.

@tsnobip tsnobip requested review from cknitt and fhammerschmidt July 7, 2026 11:55
@fhammerschmidt

Copy link
Copy Markdown
Member

@codex review

@tsnobip tsnobip force-pushed the add-domprops-and-domstyles branch from a07783d to 5bb4552 Compare July 7, 2026 12:00

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a07783d831

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/react/package.json
Comment thread packages/react-dom/src/ReactDOM.res Outdated
Comment thread packages/browser-router/package.json Outdated
Comment thread packages/react-dom/src/ReactDOMEvent.res Outdated
Comment thread packages/react-dom/src/ReactDOMEvent.res Outdated
Comment thread packages/react-dom/src/ReactDOMEvent.res Outdated
Comment thread packages/react-dom/src/ReactDOMEvent.res Outdated
Comment thread packages/react-dom/src/ReactDOMEvent.res Outdated
Comment thread packages/react-dom/src/ReactDOMEvent.res Outdated
Comment thread packages/react-dom/src/ReactDOMEvent.res Outdated
Comment thread packages/react-dom/src/ReactDOMEvent.res Outdated
Comment thread packages/react-dom/src/ReactDOMEvent.res Outdated
Uses yarn for the package manager.
Splits the monorepo into:
- @rescript/react
- @rescript/react-dom
- @rescript/browser-router
@tsnobip tsnobip force-pushed the add-domprops-and-domstyles branch 4 times, most recently from a4fe11c to 05fb834 Compare July 7, 2026 12:50
@tsnobip tsnobip force-pushed the add-domprops-and-domstyles branch from 05fb834 to 9d194ca Compare July 7, 2026 12:51
@tsnobip tsnobip changed the base branch from master to rescript-v13 July 7, 2026 12:56
@tsnobip tsnobip requested a review from fhammerschmidt July 7, 2026 12:57
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.

4 participants