mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Support mixed props for components
Summary: Changelog: [Changed][General] - Support mixed props for components in codegen Reviewed By: rickhanlonii Differential Revision: D43894460 fbshipit-source-id: e5faf2f83e6829170cdce550e923c3c09ddff0b0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e5b97f0f13
commit
0ae5e50e37
@@ -117,6 +117,14 @@ function getImports(
|
||||
if (typeAnnotation.type === 'ObjectTypeAnnotation') {
|
||||
imports.add('import com.facebook.react.bridge.ReadableMap;');
|
||||
}
|
||||
|
||||
if (typeAnnotation.type === 'MixedTypeAnnotation') {
|
||||
if (type === 'delegate') {
|
||||
imports.add('import com.facebook.react.bridge.DynamicFromObject;');
|
||||
} else {
|
||||
imports.add('import com.facebook.react.bridge.Dynamic;');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return imports;
|
||||
|
||||
Reference in New Issue
Block a user