Skip to content

Commit

Permalink
Updated test code
Browse files Browse the repository at this point in the history
  • Loading branch information
neytema authored Oct 13, 2017
1 parent f516e7a commit 582fe87
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ const baseScene = createScene({
render: ({ Layout }) => Layout(),

Layout: ({ Navigation, Content }) => {
const nav = Navigation();
const con = Content();
const navigation = Navigation();
const content = Content();
return [
'Layout',
...(nav ? [nav] : []),
...(con ? [con] : [])
...(navigation ? [navigation] : []),
...(content ? [content] : [])
];
},

Navigation: ({ NavigationItem }) => {
const item = NavigationItem();
if (!item) return null;
return ['Navigation', ...(item ? [item] : [])]
},

Expand Down Expand Up @@ -51,5 +52,5 @@ const secondPage = createScene(mainScene, {
Content: () => ['Second page']
});

console.log(firstPage.render());
console.log(secondPage.render());
console.log('/page1', firstPage.render());
console.log('/page2', secondPage.render());

0 comments on commit 582fe87

Please sign in to comment.