Skip to content

group Jsx modules #7347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

aspeddro
Copy link
Contributor

Creates a top-level module for Jsx. It contains the following submodules:

  • Jsx.DOMStyle
  • Jsx.Event
  • Jsx.DOM

Deprecate JsxDOM.res, JsxDOMStyle and JsxEvent

JsxDOM.res code has been duplicated to avoid cyclic dependency.

With these changes we can have a section in the sidebar menu for the Jsx module containing DOM, DOMStyle and Event

Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

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

Thanks a lot @aspeddro!

This means, however, that we need to change rescript-react accordingly at some point.

@mununki do you see any issue with this?

runtime/Jsx.res Outdated
module Event = JsxEvent
module DOM = {
type style = DOMStyle.t
type domRef
Copy link
Member

Choose a reason for hiding this comment

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

I think it is problematic that the types defined here (other than style) are different from those in JsxDOM. They should all be aliases.

Copy link
Contributor Author

@aspeddro aspeddro Mar 25, 2025

Choose a reason for hiding this comment

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

JsxDOM.domProps.children is of type Jsx.element, defining a alias here creates a cyclic dependency Jsx.cmj -> JsxDOM.cmj -> Jsx.cmj

Unless we create a file Jsx_common.res to put the common values/types

Verified

This commit was signed with the committer’s verified signature.
aspeddro Pedro Castro
@aspeddro aspeddro force-pushed the group-jsx-modules branch from 25f43c3 to 668ccb3 Compare March 25, 2025 13:01

Verified

This commit was signed with the committer’s verified signature.
aspeddro Pedro Castro

Verified

This commit was signed with the committer’s verified signature.
aspeddro Pedro Castro

Verified

This commit was signed with the committer’s verified signature.
aspeddro Pedro Castro
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.

None yet

2 participants