Skip to content

Feat: add loading dom prop #45

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

Merged
merged 2 commits into from
May 31, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ReactDOM.res
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ module Props = {
@optional
list: string,
@optional
loading: string, /* "lazy", "eager" */,

Choose a reason for hiding this comment

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

We can specify the values exactly at the type level:

loading: [#lazy | #eager],

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay I made the change. I had to wrap lazy in quotes because it is a reserved keyword. Also, I used string because I noticed other props that are have a small/finite number of options just use string. (Like method and inputMode)

@optional
loop: bool,
@optional
low: int,
Expand Down