Skip to content

Conversation

@Biki-das
Copy link
Contributor

@Biki-das Biki-das commented Oct 31, 2025

This PR adds a new test case to verify that style properties with empty string values (e.g., { color: '' }) are correctly skipped during style serialization. This behavior prevents React from rendering invalid CSS like style="color:" and avoids potential hydration mismatches between server and client.

https://github.com/facebook/react/blob/main/packages/react-dom-bindings/src/client/CSSPropertyOperations.js#L35

this line seems to be doing all the heavy lifting here, we already have undefined & null test added and this PR adds the no zero-length styles, which completes the test coverage.

Screenshot 2025-10-31 at 11 49 13 PM All Tests are passing.

cc @rickhanlonii @eps1lon

Ensures that empty string style values (e.g., { color: '' }) are skipped
during serialization, matching browser behavior and preventing hydration
mismatches.
@meta-cla meta-cla bot added the CLA Signed label Oct 31, 2025
@react-sizebot
Copy link

The size diff is too large to display in a single comment. The GitHub action for this pull request contains an artifact called 'sizebot-message.md' with the full message.

Generated by 🚫 dangerJS against f63a17b

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.

2 participants