Skip to content

[DevTools] Preserve -0 in inspected values#36407

Open
raashish1601 wants to merge 1 commit intofacebook:mainfrom
raashish1601:codex/devtools-preserve-minus-zero
Open

[DevTools] Preserve -0 in inspected values#36407
raashish1601 wants to merge 1 commit intofacebook:mainfrom
raashish1601:codex/devtools-preserve-minus-zero

Conversation

@raashish1601
Copy link
Copy Markdown

Summary

DevTools already preserves lossy primitive values like Infinity, -Infinity, NaN, and undefined when inspected values cross the bridge. This adds the same handling for -0, which otherwise gets serialized and displayed as 0.

This updates:

  • DevTools dehydration/hydration for -0
  • editable value parsing/stringifying
  • simple value rendering in the Components panel
  • modern and legacy inspected element coverage

Tests

  • git diff --check

I also attempted the focused DevTools Jest path locally, but the build required by --project devtools --build could not be produced in this Windows shell because corepack yarn build-for-devtools exits while invoking the repository's POSIX shell prebuild script.

@meta-cla meta-cla Bot added the CLA Signed label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant