Remove nested JSON.stringify from props serialization #7995
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
JSON.stringify
once when serializing props for an islandTesting
I added a test that the kind of nested data from #7978 results in a normal-sized serialized text.
I didn't add more tests in this branch because I'm not comfortable changing the code organization in the project but I committed to another branch how I tested the implementation, basically by adding roundtrip tests to the file
serialize.test.js
. However I had to move the deserialization to the same file as the serialization, which I'm not sure fits the project structure. See daltonmaag@a513407Docs
I believe this change should be transparent to users so I'm not sure it needs documenting?