Android - pass initial props to ViewManager createView in non-Fabric (#31053)

Summary:
https://github.com/facebook/react-native/issues/31051
When trying to create custom viewmanagers,  we don't have props, I have a use case where I want to create views on the basis of provided react prop from react native.
## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Changed] - pass initial props to ViewManager createViewInstance method in non-Fabric

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

Test Plan:
Tested Manually.

(Facebook - see D26719538, which should land first)

Reviewed By: mdvacca

Differential Revision: D26719510

Pulled By: JoshuaGross

fbshipit-source-id: ced78aa919e6b433e22ddb7c9eccc3e3e91950e9
This commit is contained in:
Gaurav Gupta
2021-03-04 22:22:34 -08:00
committed by Facebook GitHub Bot
parent 4c73ab08ed
commit ea3495399b
@@ -278,7 +278,8 @@ public class NativeViewHierarchyManager {
try {
ViewManager viewManager = mViewManagers.get(className);
View view = viewManager.createView(tag, themedContext, null, null, mJSResponderHandler);
View view =
viewManager.createView(tag, themedContext, initialProps, null, mJSResponderHandler);
mTagsToViews.put(tag, view);
mTagsToViewManagers.put(tag, viewManager);