mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
4c73ab08ed
commit
ea3495399b
+2
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user