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

Document _ prefixed props (eg: _ItemSeparatorComponent) or change this #5

Open
MoOx opened this issue Aug 20, 2019 · 2 comments
Open

Comments

@MoOx
Copy link
Member

MoOx commented Aug 20, 2019

Coming from JS, this can be disturbing. You could think it's unused, since _ are often unused to avoid non usage warning.

We could also try to remove them & use lowercase.

Thoughts @cknitt @sgny ?

@cknitt
Copy link
Member

cknitt commented Aug 20, 2019

AFAIK the _ props are the only way this works with @bs.obj and thereby @react.component - @bs.as is not supported here.

@sgny
Copy link

sgny commented Aug 20, 2019

It appears we responded at the same time.

This is already addressed in BuckleScript documentation however, we might as well add a reference to that. The leading _ is ignored when an uppercase letter follows and I understand some of these props are supposed to begin with an uppercase letter. I don't understand the design decision that makes these props so particularly special that they could not have been in lowercase, but that's a different kettle of fish.

To be honest, coming from JavaScript nothing should be too weird 😁.

@MoOx MoOx transferred this issue from rescript-react-native/rescript-react-native Dec 10, 2019
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

No branches or pull requests

3 participants