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:
Joshua Gross
2019-04-15 01:46:04 -07:00
committed by Facebook Github Bot
parent b60651dd09
commit bbd925cdd1
8 changed files with 59 additions and 23 deletions
@@ -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);