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

Show property type of value (string,int,etc) on state/props. #16545

Closed
gydotitulaer opened this issue Aug 22, 2019 · 3 comments
Closed

Show property type of value (string,int,etc) on state/props. #16545

gydotitulaer opened this issue Aug 22, 2019 · 3 comments

Comments

@gydotitulaer
Copy link

feature

What is the current behavior?
On the new developer tool you are unable to see what property type the value. You used to be able to see if the value was a string or int because of the quotation marks (for example id: "1" (string) or id: 1 (int)). Both string and int are shown without quotes.

What is the expected behavior?
I want to see if the value inside the prop or state is an string or integer by using quotation marks on the value.
id: "1"

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
I'm using version:
4.0.5 (8/19/2019)

Did this work in previous versions of React?
Yes, 3.*

@bvaughn
Copy link
Contributor

bvaughn commented Aug 23, 2019

On the new developer tool you are unable to see what property type the value. ou used to be able to see if the value was a string or int

You still can. Numbers use <input type="number"> (which shows the up/down stepper). Booleans use <input type="checkbox">. Strings use <input type="text">.

@bvaughn
Copy link
Contributor

bvaughn commented Aug 23, 2019

I do hear you though. This is currently kind of limited in that the type isn't super clear, but worse- you can't change the type if you want to.

The style editor supports different types using JSON.parse. We could probably do the same here.

We actually already have an issue tracking this, so I'm just going to mark this one as a duplicate of #16476. 😄

@gydotitulaer
Copy link
Author

On the new developer tool you are unable to see what property type the value. ou used to be able to see if the value was a string or int

You still can. Numbers use <input type="number"> (which shows the up/down stepper). Booleans use <input type="checkbox">. Strings use <input type="text">.

Hey bvaughn,

Thanks for your reply, i did meant the data inside a prop or state as you mentioned in your second post.

When I was developing I quickly looked into the editor to check what type of data my number was, so i could set my PropType to number or string. The editor made me think it was a int. But yea thanks again for your reply and i'll keep track of the other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants