Merge branch 'main' into docs/updateDocs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
path: "https://reactnative.dev/docs/getting-started.html"
|
||||
path: "https://reactnative.dev/docs/getting-started"
|
||||
title: "React Native"
|
||||
redirect: true
|
||||
---
|
||||
|
@@ -27,7 +27,7 @@ $> yarn add yoga-layout
|
||||
```
|
||||
|
||||
This is an example on how to use Yoga in JavaScript, for a full API reference,
|
||||
have a look at the [flow-type definitions](https://github.com/facebook/yoga/blob/master/javascript/sources/entry-common.js#L123).
|
||||
have a look at the [flow-type definitions](https://github.com/facebook/yoga/blob/main/javascript/sources/entry-common.js#L123).
|
||||
|
||||
```js
|
||||
import yoga, {Node} from 'yoga-layout';
|
||||
@@ -36,6 +36,7 @@ const root = Node.create();
|
||||
root.setWidth(500);
|
||||
root.setHeight(300);
|
||||
root.setJustifyContent(yoga.JUSTIFY_CENTER);
|
||||
root.setFlexDirection(yoga.FLEX_DIRECTION_ROW);
|
||||
|
||||
const node1 = Node.create();
|
||||
node1.setWidth(100);
|
||||
|
Reference in New Issue
Block a user