Skip to content

Commit 24e152e

Browse files
author
Claudio Gonzalez
committed
Cambiando el router por react-navigation
1 parent 4b7e838 commit 24e152e

21 files changed

+5606
-4882
lines changed

index.js

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
11
/**
22
* @format
33
*/
4+
import 'react-native-gesture-handler';
45
import React from 'react';
56

67
import {AppRegistry} from 'react-native';
78
import {name as appName} from './app.json';
89
import AlbumList from './src/components/AlbumList';
910
import PhotoList from './src/components/PhotoList';
10-
import {Router, Scene, Stack} from 'react-native-router-flux';
11+
import { NavigationContainer } from '@react-navigation/native';
12+
import { createStackNavigator } from '@react-navigation/stack';
13+
14+
const Stack = createStackNavigator();
15+
1116

1217
// Create a component
1318
const App = () => (
14-
<Router>
15-
<Stack key="root">
16-
<Scene
17-
key="albumList"
19+
<NavigationContainer>
20+
<Stack.Navigator>
21+
<Stack.Screen
22+
name="albumList"
1823
component={AlbumList}
19-
title="Albums"
20-
initial={true}
24+
options={{title: 'Albums'}}
25+
/>
26+
<Stack.Screen
27+
name="photoList"
28+
component={PhotoList}
29+
options={{title: 'Photos'}}
2130
/>
22-
<Scene key="photoList" component={PhotoList} title="Photos" />
23-
</Stack>
24-
</Router>
31+
</Stack.Navigator>
32+
</NavigationContainer>
2533
);
2634

2735
AppRegistry.registerComponent(appName, () => App);

ios/Podfile.lock

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ PODS:
233233
- React-cxxreact (= 0.62.2)
234234
- React-jsi (= 0.62.2)
235235
- React-jsinspector (0.62.2)
236+
- react-native-safe-area-context (3.0.2):
237+
- React
236238
- React-RCTActionSheet (0.62.2):
237239
- React-Core/RCTActionSheetHeaders (= 0.62.2)
238240
- React-RCTAnimation (0.62.2):
@@ -292,6 +294,8 @@ PODS:
292294
- React-cxxreact (= 0.62.2)
293295
- React-jsi (= 0.62.2)
294296
- ReactCommon/callinvoker (= 0.62.2)
297+
- RNCMaskedView (0.1.10):
298+
- React
295299
- RNGestureHandler (1.6.1):
296300
- React
297301
- RNReanimated (1.9.0):
@@ -338,6 +342,7 @@ DEPENDENCIES:
338342
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
339343
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
340344
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
345+
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
341346
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
342347
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
343348
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
@@ -349,6 +354,7 @@ DEPENDENCIES:
349354
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
350355
- ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`)
351356
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
357+
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
352358
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
353359
- RNReanimated (from `../node_modules/react-native-reanimated`)
354360
- RNScreens (from `../node_modules/react-native-screens`)
@@ -398,6 +404,8 @@ EXTERNAL SOURCES:
398404
:path: "../node_modules/react-native/ReactCommon/jsiexecutor"
399405
React-jsinspector:
400406
:path: "../node_modules/react-native/ReactCommon/jsinspector"
407+
react-native-safe-area-context:
408+
:path: "../node_modules/react-native-safe-area-context"
401409
React-RCTActionSheet:
402410
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
403411
React-RCTAnimation:
@@ -418,6 +426,8 @@ EXTERNAL SOURCES:
418426
:path: "../node_modules/react-native/Libraries/Vibration"
419427
ReactCommon:
420428
:path: "../node_modules/react-native/ReactCommon"
429+
RNCMaskedView:
430+
:path: "../node_modules/@react-native-community/masked-view"
421431
RNGestureHandler:
422432
:path: "../node_modules/react-native-gesture-handler"
423433
RNReanimated:
@@ -453,6 +463,7 @@ SPEC CHECKSUMS:
453463
React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161
454464
React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da
455465
React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493
466+
react-native-safe-area-context: c23e140ee9a482e89991798aed110fbffefb2f51
456467
React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
457468
React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0
458469
React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71
@@ -463,12 +474,13 @@ SPEC CHECKSUMS:
463474
React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d
464475
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
465476
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
477+
RNCMaskedView: f5c7d14d6847b7b44853f7acb6284c1da30a3459
466478
RNGestureHandler: 8f09cd560f8d533eb36da5a6c5a843af9f056b38
467479
RNReanimated: b5ccb50650ba06f6e749c7c329a1bc3ae0c88b43
468480
RNScreens: 62211832af51e0aebcf6e8c36bcf7dd65592f244
469481
Yoga: 3ebccbdd559724312790e7742142d062476b698e
470482
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
471483

472-
PODFILE CHECKSUM: 0355e5ad819fbc8c16be4b333c8422cfc84f12b9
484+
PODFILE CHECKSUM: 6412b11d27c43cf7625b04bff3319390e4d9dcc7
473485

474486
COCOAPODS: 1.9.1

ios/Pods/Manifest.lock

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)