mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
MountingManager can create views with props in one step instead of two
Summary: Create views with props in one call instead of two. Backwards-compatible. Reviewed By: shergin Differential Revision: D14846424 fbshipit-source-id: cb53225579089f7e51d4e9d1fc9fc2e331a994c1
This commit is contained in:
committed by
Facebook Github Bot
parent
b60651dd09
commit
bbd925cdd1
@@ -83,7 +83,7 @@ public class SimpleViewPropertyTest {
|
||||
|
||||
@Test
|
||||
public void testOpacity() {
|
||||
View view = mManager.createView(mThemedContext, new JSResponderHandler());
|
||||
View view = mManager.createViewWithProps(mThemedContext, buildStyles(), new JSResponderHandler());
|
||||
|
||||
mManager.updateProperties(view, buildStyles());
|
||||
assertThat(view.getAlpha()).isEqualTo(1.0f);
|
||||
@@ -97,7 +97,7 @@ public class SimpleViewPropertyTest {
|
||||
|
||||
@Test
|
||||
public void testBackgroundColor() {
|
||||
View view = mManager.createView(mThemedContext, new JSResponderHandler());
|
||||
View view = mManager.createViewWithProps(mThemedContext, buildStyles(), new JSResponderHandler());
|
||||
|
||||
mManager.updateProperties(view, buildStyles());
|
||||
assertThat(view.getBackground()).isEqualTo(null);
|
||||
|
||||
Reference in New Issue
Block a user