[DevTools] Display RegExp values in props/state#17023
[DevTools] Display RegExp values in props/state#17023Zirak wants to merge 1 commit intofacebook:masterfrom
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Previously, when props/state contained a regexp, it was shown as an empty object. This commit adds regexps as values in need of special rehydration (like Symbols or TypedArrays), and display them as a user might expect.
009f403 to
cfbfa89
Compare
|
Hey sorry for not seeing this sooner. I like this feature, but the underlying code has changed a lot since your PR. I'm going to try to resolve it locally. Stay tuned. |
|
I'm going to incorporate your branch, fix the conflicts, and add some more tests. Closing this PR in favor of #17690. (Your commit will stay in the history though!) |
|
Awesome, thanks! |
|
FYI this change just went out as part of v4.4! |
|
woo, thanks for the follow-up, especially on a small PR like this! |
Previously, when props/state contained a regexp, it was shown as an
empty object. This commit adds regexps as values in need of special
rehydration (like Symbols or TypedArrays), and display them as a user
might expect.
These values may be editable, but as regexps are not valid JSON it might
depart from the usual editing functionality, which may not be worth the
hassle just to support regexps.
Before:

After:
