Guest User

Untitled

a guest
Jun 23rd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. import React from "react";
  2. import { Text } from "react-native";
  3. import { Navigation } from 'react-native-navigation';
  4.  
  5. class Simple extends React.Component {
  6. render() {
  7. return (<Text>Hello, I'm Awesome.</Text>);
  8. }
  9. }
  10.  
  11. Navigation.registerComponent('simple', () => Simple);
  12. Navigation.setRoot({
  13. root: {
  14. stack: {
  15. children: [{
  16. component: {
  17. name: 'simple',
  18. passProps: {
  19. text: 'stack with one child'
  20. }
  21. }
  22. }],
  23. options: {
  24. topBar: {
  25. title: {
  26. text: 'Welcome screen'
  27. }
  28. }
  29. }
  30. }
  31. }
  32. });
Add Comment
Please, Sign In to add comment