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

Snack Bug regarding PropType Validation? #18

Open
alishehzad2017 opened this issue Nov 29, 2019 · 4 comments
Open

Snack Bug regarding PropType Validation? #18

alishehzad2017 opened this issue Nov 29, 2019 · 4 comments
Assignees
Labels
bug Something isn't working website

Comments

@alishehzad2017
Copy link

alishehzad2017 commented Nov 29, 2019

I originally created this issue on the expo repository and a Samaritan who goes by wodin said it would be better moving it to this repository.

The issue I have been experiencing is not seeing a yellow warning box on snack when I pass an incorrect Proptype.

Below is the link to the snack that demonstrates the problem:
https://snack.expo.io/@alishehzad/no-warning-for-incorrect-proptype

Here count is validated in 'Count.js' and exported to 'App.js'.

This works fine locally. Just not in a snack.

Following is the link to the original question: https://forums.expo.io/t/proptype-validation-on-snack/30580

@wodin
Copy link

wodin commented Nov 29, 2019

Here's a link to the snack that demonstrates the problem:

https://snack.expo.io/@alishehzad/no-warning-for-incorrect-proptype

This works fine locally. Just not in a snack.

Sorry, I think I should have said to create the issue in the snack-web repository rather than here. I hope someone can move it there.

@alishehzad2017
Copy link
Author

Thank you for the link to a more relevant repository and the transfering process.

Unfortunately, it seems like I dont have transfer privileges. Hence, Ive created a new issue in that repository. Below is the link:
https://github.com/expo/snack-web/issues/30

@wodin
Copy link

wodin commented Nov 30, 2019

Yes, I was thinking someone from the Expo team might transfer it, but since there's already a similar issue they may as well close this one.

@IjzerenHein IjzerenHein self-assigned this Jul 8, 2020
@IjzerenHein
Copy link
Contributor

PropTypes unfortunately doesn't work. As prop-types is no longer cool, I recommend moving to typings.
I've updated the example to TypeScript and it gives you hints in the editor that the count type is incorrect.

https://snack.expo.io/@ijzerenhein/no-warning-for-incorrect-proptype

image

Is this a viable solution for you?

@IjzerenHein IjzerenHein transferred this issue from expo/expo Dec 17, 2020
@IjzerenHein IjzerenHein added bug Something isn't working website labels Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working website
Projects
None yet
Development

No branches or pull requests

3 participants