SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Refactor toJSON (#42828)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42828

Updates to toJSON:
- return object tree instead of formatted snapshot string. Applying the `'react.test.json'` symbol lets Jest do the formatting work for us
- Source props from `pendingProps` on `instanceHandle`. This adds props such as `pointerEvents` and `style` which were present on RTR's snapshots but don't get included in the node's `props` collection
- Render text node as text value, instead of RCTRawText like `<RCTRawText text="Hello" />`

Changelog: [internal]

Reviewed By: kassens

Differential Revision: D53321821

fbshipit-source-id: 033637b9152441c318c9c797aa9223ff15768873
J
Jack Pope committed
41045a14862f918937f70c49fff6d05c2f7fc005
Parent: 48ec680
Committed by Facebook GitHub Bot <[email protected]> on 2/2/2024, 10:34:43 PM