Commit Graph

9 Commits

Author SHA1 Message Date
Rahul Jain 40aef6edee Fixes for SimpleNavigationApp
Summary:
Changes made in React-Native Docs

1. Removed unnecessary imports `Text, View` from `SimpleNavigationApp`
2. Took MyScene propTypes out of the class as `static propTypes = {` throws parsing error via eslint
Closes https://github.com/facebook/react-native/pull/10513

Differential Revision: D4066367

Pulled By: hramos

fbshipit-source-id: f7d0ccd5f20637a043e96e115a4c40ce6121a737
2016-10-23 12:28:53 -07:00
Marco Lovato ea5b335351 Fixed and enhanced the Navigators example
Summary:
It took me a few timeslots of my life to figure out how to make this work. First, I tried to break into 2 files. The app export made no sense to me. But after doing that, I discover a invalid token, the return() was not supposed to be there. So I fixed the sample.
Closes https://github.com/facebook/react-native/pull/9802

Differential Revision: D3841320

Pulled By: mkonicek

fbshipit-source-id: 999227ee1c234b92d34844c2370ef654116b6a1d
2016-09-09 04:43:49 -07:00
hl3hl3 2e8d027a9e Missing braces
Summary: Closes https://github.com/facebook/react-native/pull/9624

Differential Revision: D3791593

Pulled By: hramos

fbshipit-source-id: 04bf3eee2d21cf2d5e61de234d5b798acaa9570b
2016-08-30 09:43:55 -07:00
Muhammad Raihan Muhaimin 228dcd15d6 Navigator wasn't imported
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).

For more info, see
Closes https://github.com/facebook/react-native/pull/9556

Differential Revision: D3764387

fbshipit-source-id: 71cc80eff351298c1b3ac5a134191a7b64ea649c
2016-08-24 09:29:03 -07:00
Seph Soliman 0fdbfb029e Return statement missing for renderScene
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?
Example code for "Using Navigators" under "THE BASICS" does not work. renderScene needs to return the components, not just instantiate them.

**Test plan (required)**

I copy-paste and ran the code but did not get anything rendered. I added a return statement before the component which made it work.

Arrow functions need a return statement when supplying a { block of code }.
Closes https://github.com/facebook/react-native/pull/9161

Differential Revision: D3663200

Pulled By: hramos

fbshipit-source-id: a8732dd1098de7c8ea915f459adb3403a8168f19
2016-08-03 11:28:59 -07:00
gregjacobson db35324610 Change getDefaultProps to static and remove warning
Summary:
When trying sample code from the _Working with Scenes_ area of this page I see a warning and the example did not appear to work as expected.  To fix this I updated the code to static so others following along will not see a warning about using a static property to define defaultProps.   Also included is a screen capture of the warning message.

![react-native-warning-defaultprops](https://cloud.githubusercontent.com/assets/1053650/17271580/9d0e85fc-564d-11e6-9c58-f73ef708aade.png)
Closes https://github.com/facebook/react-native/pull/9108

Differential Revision: D3647366

fbshipit-source-id: 93b152756e6351614caf4ae1d5f45bac893fdf7b
2016-07-30 17:13:41 -07:00
Grey Vugrin 143b6493b0 Add AppRegistry to imports in example
Summary:
Missing import throws variable error
Closes https://github.com/facebook/react-native/pull/8988

Differential Revision: D3611142

fbshipit-source-id: b50edf52cdf6c723abaa7bd021cf11ee5b4d874d
2016-07-23 16:43:27 -07:00
Joel Marcey b1e49832ef Make prev links work in guides and APIs.
Summary:
We had rendering support for prev links, but we never had any previous links in our metadata. Only next links. This adds that support to both Guides and APIs.

**For guides**: `previous` is manually inserted into the metadata of the actual markdown file.
**For APIs/Components**: `previous` is established via code within `extractDocs.js`

> This isn't totally perfect. For example, the transition from the last guide to the first API/component has a next link from the guide, but not a previous link from the API since the way you get the previous links are different from guides and APIs. But this gets us really close.
Closes https://github.com/facebook/react-native/pull/8754

Differential Revision: D3557972

Pulled By: hramos

fbshipit-source-id: e270bb51e7a4f59f61dad28ae0928d27d0af3d4a
2016-07-13 14:58:27 -07:00
Héctor Ramos b33424e5ed Fix links from networking to navigation in The Basics.
Summary:
Fixes #8611.

Once this lands, we may want to cherry-pick it into 0.29 to fix the broken links.
Closes https://github.com/facebook/react-native/pull/8698

Differential Revision: D3544388

Pulled By: JoelMarcey

fbshipit-source-id: d5132b112e3079d1fd9ab6d84ff1a4328bee871f
2016-07-11 12:13:45 -07:00