Skip to content
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

group Jsx modules #7347

Draft
wants to merge 1 commit 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

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?

@@ -21,6 +21,7 @@
}
},
"../../..": {
"name": "rescript",
Copy link
Member

Choose a reason for hiding this comment

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

Not sure why this keeps changing back and forth.
Probably depending on the npm version used?
If we want this change, we should do it in a separate PR for all package-lock.json files.

@@ -60,4 +60,4 @@ module Elements = {
external jsxsKeyed: (string, props, ~key: string=?, @ignore unit) => Jsx.element = "jsxs"

external someElement: element => option<element> = "%identity"
}
Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary change

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.

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.

2 participants