Files
react-native/packages/react-native
Nick Gerleman a941d067f5 Use ContextContainer::find() for MC access instead of ContextContainer::at() (#37303)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37303

Intent of a change to the last diff was to make `PropsParserContext` act gracefully if it tried to parse "auto" without a `ReactNativeConfig` being set (e.g. if our tests wanted to do that).

We would actually assert if we tried to do that with what I added, since `ContextContainer::at()` acts like `at()` does in the STL containers and will expect the parameter to be in bounds/present. (`RawProps::at()` is the odd one out that will return `nullptr` instead).

This changes the usage to ContextContainer::find() which will return ` std::optional<std::shared_ptr>>`.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D45651032

fbshipit-source-id: b1f16f9329ceb4ef7a6c469f968eae57a2fe3da5
2023-05-09 14:29:40 -07:00
..
2023-05-04 17:13:16 -07:00
…
…
…