99 Commits

Author SHA1 Message Date
Ashoat Tevosyan
b759d3136e Fix Flow types (and update RN version) (#2619)
* Fix .flowconfig to stop ignoring modules and properly include React Native libraries

Currently, there are numerous ignored libraries that are hiding type errors. Actually, they're causing type errors too. This sort of thing only patches over actual problems, so we have to revert them to get a config we can build upon.

* Update react-native/flow-bin dependencies

We want to have Flow types working with the latest packages.

* Update flow-typed libraries (auto-generated)

* Fix typing of navigation prop used by withNavigation HOC

The current typing is clearly a typo, as it is circular. `NavigationScreenProp` should be used to type the navigation prop

* Fix typing of easing function

What's funny is that I fixed this before in d71ed75133b97e33a8a683eda334b3005107d379. @skevy reintroduced the mistyped function in 9436d03fe8fface09001a5a40ce0aa8a01ad9e7e, which didn't trigger any Flow errors because .flowconfig was ignoring the entire react-native package

* Correct typing of View and Text style prop

The current code thinks it can import these, but this isn't true, and was being hidden because the .flowconfig ignored the whole react-native package. There's no easy to type Text and View at the current moment, as far as I can tell. Importing the highly generic `StyleObj` seems like the best bet, and is what I have being using in my projects.

* Import NavigationScreenComponent using full path

* Updating yarn.lock files

* Get rid of library overrides in flow-typed/react-native.js and flow/react-navigation.js

* Add @flow to src/react-navigation.js and make last three params to createNavigator optional

* Make screenProps and navigationOptions optional in NavigationNavigatorProps

* yarn run format

* Readd react-navigation/node_modules ignore to NavigationPlayground's .flowconfig

Realized this line I removed in the first commit is necessary when using npm link/yarn link, which is what the CircleCI build does

* Make all DrawerViewConfig's params optional

Some of these params are marked as optional because they have defaults. However, the only place `DrawerViewConfig` is used is as the input the function that then applies the defaults

* Make all props in NavigationNavigatorProps optional

`NavigationNavigatorProps` is used to type the props of the component that is output by the `StackNavigator`, `TabNavigator`, etc. component factories. This component does not need to have any props specified.

* Make second param to `DrawerNavigator` factory optional

`DrawerNavigator`, just like `TabNavigator` and `StackNavigator`, can be called with just a single argument (ie. omitting the config)

* Upgrade to RN 0.48.4 to address https://github.com/facebook/react-native/issues/15810
2017-09-25 11:29:34 -05:00
Kevin Cooper
312b68790a Upgrade the ReduxExample app (use CRNA) (#2171)
* [ReduxExample] Delete android and ios dirs

* [ReduxExample] Upgrade using create-react-native-app

* [ReduxExample] Add postinstall script to clean up files Yarn copies in

Yarn copies them when installing locally, causing lots of @proviesModule collisions.

* [ReduxExample] Upgrade expo and other dependencies

* [ReduxExample] Don't delete .git just in case
2017-09-06 21:02:57 -05:00
Aleksey Kuznetsov
af53b0e5b8 Add custom transitioner example to NavigationPlayground (#2412) 2017-09-06 19:41:41 -05:00
Kevin Cooper
19babadf38 Fix the NavigationPlayground example! (#2170)
* [Playground] Commit auto-changes to package.json, yarn.lock

* [Playground] Rerun create-react-native-app

Preserving rn-cli.js and transformer.js

Still not quite working.

* [Playground] Fix the Expo loading issue by removing projectRoots

Now it looks in the right place to find its resources, including 'entryPoint'.

* [Playground] Add postinstall script to clean up files Yarn copies in

Yarn copies them when installing locally, causing lots of @providesModule collisions.

* Update the Contributors guide to explain how to use the example app

And recommend Yarn by default

* [Playground] Remove now-obsolete rn-cli.config.js

* [Playground] Upgrade expo and other dependencies

* [Playground] Don't delete .git just in case
2017-09-06 10:36:20 -05:00
Jan Peer Stöcklmair
aa92bcb0dd Fix ActiveScreen in custom navigation (#2354) 2017-08-28 21:35:48 -05:00
Adam Miskiewicz
e2afc982da
Fix tests in NavigationPlayground 2017-07-19 14:03:58 -07:00
Adam Miskiewicz
ebf1e2e893
Update NavigationPlayground to 0.45.1, add stub react-nav flow definition 2017-07-19 12:59:40 -07:00
Sergey Zhigunov
4f26834ef0 Update examples (#1968)
Use prop-types instead of React.PropTypes
2017-06-22 20:05:03 -07:00
Adam Miskiewicz
fff7ef49c5
Add icon for example 2017-05-15 19:45:27 -07:00
Adam Miskiewicz
83e2cf007b
Fix tests in examples 2017-05-15 19:36:04 -07:00
Adam Miskiewicz
de6396facd
Don't use jest-setup on NavigationPlayground 2017-05-15 19:16:00 -07:00
Adam Miskiewicz
518f491727
Install react-navigation in NavigationPlayground 2017-05-15 19:12:52 -07:00
Adam Miskiewicz
4632e1c348
Fix path to Jest in NavigationPlayground 2017-05-15 19:08:16 -07:00
Adam Miskiewicz
44dac9b629
Don't run Jest watch in CI 2017-05-15 19:06:17 -07:00
Adam Miskiewicz
1cd16bcf4a
Convert NavigationPlayground project to a CRNA project 2017-05-15 18:57:22 -07:00
Adam Miskiewicz
d145332fdf
Remove old NavigationPlayground code (and ExpoNavigationPlayground) 2017-05-15 18:57:22 -07:00
Daniel Schmidt
b19beda0a7 Add NavigationPlayground Expo Demo (#1523)
* use react-navigation as dependency
* add expo based playground app
* name expo playground demo in the docs
* add ci task to deploy playground demo
2017-05-15 16:55:10 -07:00
Adam Miskiewicz
fe9e30d8a8 Change react-navigation path in example package.json to relative 2017-05-14 21:28:38 -07:00
Adam Miskiewicz
1ae3798137 Upgrade to React Native 0.44 + Flow 0.42 2017-05-14 21:28:38 -07:00
Adam Miskiewicz
f3a958dca1 Update/Fix Prettier + Eslint config for codebase
Run Prettier/Eslint on entire codebase, fix issues
2017-05-14 14:18:09 -07:00
Kevin Cooper
f575d90986 [Minor] Update Stacks examples for better clarity (#1341)
* Update Stacks{In,Over}Tabs example for better clarity

* Remove redundant navigationOptions in stack examples

* Update text in ReduxExample to clarify which route is being used
2017-05-12 15:27:53 -07:00
Ihor
5aaf4a86be Delete unused import component 2017-05-07 11:26:34 +05:30
Koen Punt
b532f8cc19 fix toggle header example (#1286) 2017-04-28 12:58:13 +02:00
Kevin Cooper
655b46b60b Improve the Redux docs (#1172)
* [ReduxExample] Programmatically generate initial state

* [ReduxExample] Return original state if nextState is null

* [Docs] Add getStateForAction to redux integration example

* [Docs] Add link to ReduxExample app

* [Docs] Give each example a 'DRY' README linking to real docs

* [Docs] Clean up the Contributors guide a bit

* [Docs] Remove numbers from sections in Contributors guide

They don't seem very meaningful, and don't need to be done in order
2017-04-25 11:48:54 +02:00
Kevin Cooper
85c2235a3c Improve CircleCI infrastructure (#1173)
* [Example] Get tests passing on ReduxExample and NavigationPlayground

* [CI] Use more vague versioning so we're always up to date

* [CI] Test that the example apps run without error

* [CI] Install the current local version of react-nav before testing

* Fix tabs => spaces in ReduxExample/package.json

* Remove LinkingExample entirely

It's now part of NavigationPlayground.
2017-04-24 10:54:58 -07:00
Kevin Cooper
5c12c41d96 Fix the ReduxExample app (3) (#1144)
* [Example] Upgrade dependencies to fix the ReduxExample app

* [Example] Also upgrade and fix the LinkingExample app

* [Example] Update MainApplication.java to fix Android API
2017-04-23 17:33:57 +02:00
Joe McKie
2bbfc03cd0 Bump dependency versions to reflect current RN 2017-04-18 15:04:47 +02:00
Mike Grabowski
ce5be229ed Upgrade React Native (#1093)
* Upgrade RN

* Clean up
2017-04-18 14:28:47 +02:00
Mike Grabowski
2dc869fedd Navigate to nested router within stack (#1025) 2017-04-13 09:28:47 -07:00
Mike Grabowski
93976d358e Introducing flat options (#984)
* Initial commit

* Remove HybridExample (#985)

* Remove HybridExample

* Remove last mention of HelloHybrid

* Remove console log

* Fix flow and example

* Fix routers api docs

* Keep options in single place

* chore

* Fix styling

* Organise miscs

* Better flow type for screen options

* Flow test website and add more types to options

* navigationOptions instead of prevOptions makes more sense

* Fixes

* Fix up docs

* Fix

* Update route decl

* Provide error when removed API is used

* Remove lock

* Add validators

* Make StacksOverTabs config valid again

* Do not return

* Fix redbox
2017-04-12 15:49:08 -07:00
Mike Grabowski
fb2a0ad33d Remove HybridExample (#985)
* Remove HybridExample

* Remove last mention of HelloHybrid
2017-04-10 12:40:14 -07:00
Kevin Cooper
6978ceec85 Fix the ReduxExample app (2) (#945)
* [Example] Fix the ReduxExample app

Just a bit of cleanup so it can run.

* [Example] Remove AsyncStorage persistence from ReduxExample

It's a cool feature, but isn't necessary to demonstrate how to use
react-navigation and may cause more confusion than it's worth.
2017-04-07 09:06:44 -07:00
Sami Jaber
669da3eca5 refactored Redux Example (#819) 2017-04-06 16:20:04 -07:00
Kevin Cooper
2b307c754a [Playground] Add TabsInDrawer example (#930) 2017-04-06 09:25:38 -07:00
Kevin Cooper
b49b2c1b62 [Playgrond] Add StacksOverTabs example (#928)
* [Playground] Duplicate StacksInTabs to StacksOverTabs

* [Playground] Move nested routes into root stack so they appear on top

* [Playground] Go to SettingsTab instead of pushing a new Settings screen
2017-04-06 09:24:35 -07:00
Kevin Cooper
5006076352 Fix the ReduxExample app (#900)
* [Redux example] Use HTTPS-enabled endpoint to get npm modules

To fix 'yarn install'

* [Redux example] Add ReduxExample to rn-cli.config.js

This prevents those annoying @providesModule naming collisions

* [Examples] Add a basic README linking to the usage instructions
2017-04-04 21:21:06 -07:00
Alejandro Garcia
0f19a0bddf Fix flow in Navigation Playground (#735) 2017-03-22 12:08:08 -07:00
Satyajit Sahoo
a7b1243053 Fix flow (#305)
* Fix Flow and Android build

* Enable flow on CI

* Fix and suppress flow errors
2017-02-13 08:26:30 -08:00
João Luís Lima
67d64807da adds button to photo screen (#301) 2017-02-12 22:05:12 -08:00
Satyajit Sahoo
f72f5d3a9c Fix tintColor in example 2017-02-09 01:37:54 +05:30
Satyajit Sahoo
42ead04d9a Remove with navigation example 2017-02-09 01:36:27 +05:30
Sibelius Seraphini
eabec0d3b8 fix typo on HybridContainer (#185) 2017-02-07 08:39:21 -08:00
Jakub Stasiak
aead8ff9fb Add withNavigation HOC (#137) 2017-02-06 18:58:04 +05:30
Alejandro Garcia
17522c8b8f Fixed typo in HelloHybrid for ios (#151)
* Fixed typo in HelloHybrid for ios

* Use state.navState to get routeName in HelloHybrid example for ios
2017-02-02 08:41:15 -08:00
Jeff Carbonella
2e6f7a015f Use redux constants and action creator functions (#120) 2017-02-02 02:57:51 +05:30
Mike Grabowski
7a20389e04 Refactor header, tintColor support, redesign iOS back button (#109) 2017-02-02 02:50:12 +05:30
Nicolas Beck
5d5d83c582 fixed initialRouteName documentation (#121)
https://github.com/react-community/react-navigation/issues/119
2017-01-31 18:26:42 -08:00
Sagiv Ofek
11cb99d8f6 Use es6 default values for initial state (#44) 2017-01-28 00:38:22 +05:30
Adam Miskiewicz
c37ad8a0a9 Initial public release of React Navigation 2017-01-26 11:53:33 -08:00