Closed
Description
It looks like the property inspector inside React DevTools is not rendering repeating spaces properly.
I imagine this can result in some fairly frustrating debugging sessions when doing something like string matching 😄
Steps To Reproduce
- Create a component that takes a string as a property.
- Pass multiple spaces in a row to that property
name={'Testing[3 spaces]One Two'}
(I would type the actual spaces, but it appears Github truncates the extra spaces even inside the code snippet!) - Inspect that element inside React DevTools.
The current behavior
The value of the prop name
is rendered as Testing One Two
The expected behavior
The value of the prop name
should be rendered as Testing[3 spaces]One Two
Below are some screenshots of the behavior I'm seeing in production. Here's how the property value is rendered in inspector when it is output directly to the HTML:
And here is how that same value is rendered inside DevTools: