-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Can I not use propTypes? #56
Comments
Hi, I'll release 0.27 some time tomorrow and it will be possible to omit proptypes there. |
Awesome, can't wait 😄 |
It's out! :) Closing the issue for now. If there's anything broken with it, feel free to reopen! |
Hi! Glad this went in, but FYI I think omitting proptypes might be causing an issue with kea/src/kea/connect/prop-types.js Lines 19 to 24 in 5c30b00
Seems harmless but it'd be nice to silence the Thanks! Edit: Also happy to submit a PR if you had an idea on a particular direction for this one, but I wasn't sure since omitting proptypes is not really an explicit "mode" that we can detect. |
@mariusandra will the comment above be addressed in 1.0? We have to use a different library for global state because we use TypeScript and got the above error when trying to use Thanks! |
Hi @scottybollinger , I can't answer that now. However I'll leave the issue open and definitely revisit/clarify this before 1.0 is out. So hopefully yes, it will be fixed. |
Thanks 🙏 |
Prop types are totally optional in kea 1.0 |
Types can be enforced by a type system like Flow or TypeScript, and there's no real benefit (that I am aware of) to be gained in production from including them.
can they be made optional? that way they can be stripped using a babel codemode for example when building for production.
The text was updated successfully, but these errors were encountered: