2015-02-12 04:26:43 +00:00
---
2016-05-18 01:14:16 +00:00
id: quick-start-getting-started
2015-02-12 04:26:43 +00:00
title: Getting Started
layout: docs
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
category: The Basics
2015-02-12 04:26:43 +00:00
permalink: docs/getting-started.html
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
next: tutorial
2015-02-12 04:26:43 +00:00
---
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
Welcome to React Native! This page will help you install React Native on
your system, so that you can build apps with it right away. If you already
have React Native installed, you can skip ahead to the
[Tutorial ](/react-native/docs/tutorial.html ).
The instructions are a bit different depending on your development operating system, and whether you want to start developing for iOS or Android. If you
want to develop for both iOS and Android, that's fine - you just have to pick
one to start with, since the setup is a bit different.
2015-02-12 04:26:43 +00:00
2016-05-06 03:25:25 +00:00
< div class = "toggler" >
< style >
.toggler a {
display: inline-block;
padding: 10px 5px;
margin: 2px;
border: 1px solid #05A5D1 ;
border-radius: 3px;
text-decoration: none !important;
}
.display-os-mac .toggler .button-mac,
.display-os-linux .toggler .button-linux,
.display-os-windows .toggler .button-windows,
.display-platform-ios .toggler .button-ios,
.display-platform-android .toggler .button-android {
background-color: #05A5D1 ;
color: white;
}
block { display: none; }
.display-platform-ios.display-os-mac .ios.mac,
.display-platform-ios.display-os-linux .ios.linux,
.display-platform-ios.display-os-windows .ios.windows,
.display-platform-android.display-os-mac .android.mac,
.display-platform-android.display-os-linux .android.linux,
.display-platform-android.display-os-windows .android.windows {
display: block;
}< / style >
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
< span > Mobile OS:< / span >
2016-05-09 16:41:51 +00:00
< a href = "javascript:void(0);" class = "button-ios" onclick = "display('platform', 'ios')" > iOS< / a >
< a href = "javascript:void(0);" class = "button-android" onclick = "display('platform', 'android')" > Android< / a >
2016-05-21 18:42:53 +00:00
< span > Development OS:< / span >
2016-05-09 16:41:51 +00:00
< a href = "javascript:void(0);" class = "button-mac" onclick = "display('os', 'mac')" > Mac< / a >
< a href = "javascript:void(0);" class = "button-linux" onclick = "display('os', 'linux')" > Linux< / a >
< a href = "javascript:void(0);" class = "button-windows" onclick = "display('os', 'windows')" > Windows< / a >
2016-05-06 03:25:25 +00:00
< / div >
2015-02-12 04:26:43 +00:00
2016-05-06 03:25:25 +00:00
<!-- ######### LINUX AND WINDOWS for iOS ##################### -->
2015-07-30 00:29:18 +00:00
2016-05-06 03:25:25 +00:00
< block class = "linux windows ios" / >
2015-09-14 14:35:58 +00:00
2016-05-06 03:25:25 +00:00
## Unsupported
2015-09-14 14:35:58 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
< div > Unfortunately, Apple only lets you develop for iOS on a Mac. If you want to build an iOS app but you don't have a Mac yet, you can try starting with the < a href = "" onclick = "display('platform', 'android')" > Android< / a > instructions instead.< / div >
2015-09-14 14:35:58 +00:00
2016-05-10 18:16:23 +00:00
< center > < img src = "img/react-native-sorry-not-supported.png" width = "150" > < / img > < / center >
2015-09-14 14:35:58 +00:00
2016-05-06 03:25:25 +00:00
<!-- ######### MAC for iOS ##################### -->
2015-10-21 13:02:27 +00:00
2016-06-08 20:17:19 +00:00
< block class = "mac ios" / >
2015-02-12 04:26:43 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
## Dependencies for Mac + iOS
2016-02-14 18:35:41 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
You will need Xcode, node.js, the React Native command line tools, and Watchman.
2016-02-14 18:35:41 +00:00
2016-06-08 20:17:19 +00:00
< block class = "mac android" / >
2016-02-14 18:35:41 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
## Dependencies for Mac + Android
2016-02-14 18:35:41 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
You will need Android Studio, node.js, the React Native command line tools, and Watchman.
2015-02-12 04:26:43 +00:00
2016-06-08 20:17:19 +00:00
< block class = "mac ios android" / >
2015-02-12 04:26:43 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
We recommend installing node and watchman via [Homebrew ](http://brew.sh/ ).
2016-05-06 03:25:25 +00:00
```
brew install node
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
brew install watchman
2016-05-06 03:25:25 +00:00
```
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
Node comes with npm, which lets you install the React Native command line interface.
2016-05-06 03:25:25 +00:00
```
npm install -g react-native-cli
```
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
If you get a permission error, try with sudo: `sudo npm install -g react-native-cli` .
2016-05-06 03:25:25 +00:00
2016-06-08 20:17:19 +00:00
< block class = "mac ios" / >
2016-05-06 03:25:25 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
The easiest way to install Xcode is via the [Mac App Store ](https://itunes.apple.com/us/app/xcode/id497799835?mt=12 ).
2016-05-06 03:25:25 +00:00
< block class = "mac android" / >
2016-06-08 20:17:19 +00:00
Download and install [Android Studio ](https://developer.android.com/studio/install.html ).
2016-05-06 03:25:25 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
If you plan to make changes in Java code, we recommend [Gradle Daemon ](https://docs.gradle.org/2.9/userguide/gradle_daemon.html ) which speeds up the build.
2016-05-06 03:25:25 +00:00
<!-- ######### LINUX and WINDOWS for ANDROID ##################### -->
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
< block class = "linux android" / >
## Dependencies for Linux + Android
2016-05-06 03:25:25 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
< block class = "windows android" / >
2016-05-06 03:25:25 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
## Dependencies for Windows + Android
2016-05-06 03:25:25 +00:00
< block class = "linux windows android" / >
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
You will need node.js, the React Native command line tools, Watchman, and Android Studio.
2016-05-06 03:25:25 +00:00
< block class = "linux android" / >
2016-06-08 20:17:19 +00:00
Follow the [installation instructions for your Linux distribution ](https://nodejs.org/en/download/package-manager/ ) to install Node.js 4 or newer.
2016-05-06 03:25:25 +00:00
< block class = 'windows android' / >
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
We recommend installing node.js and Python2 via [Chocolatey ](https://chocolatey.org ), a popular package manager for Windows. Open a Command Prompt as Administrator, then run:
2016-05-06 03:25:25 +00:00
```
choco install nodejs.install
2016-06-08 20:17:19 +00:00
choco install python2
2016-05-06 03:25:25 +00:00
```
< block class = "windows linux android" / >
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
Node comes with npm, which lets you install the React Native command line interface.
2016-05-06 03:25:25 +00:00
```
2016-06-08 20:17:19 +00:00
npm install -g react-native-cli
2016-05-06 03:25:25 +00:00
```
2016-06-08 20:17:19 +00:00
< block class = "windows linux android" / >
2016-05-06 03:25:25 +00:00
2016-06-08 20:17:19 +00:00
Download and install [Android Studio ](https://developer.android.com/studio/install.html ).
2016-05-06 03:25:25 +00:00
< block class = "linux android" / >
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
[Watchman ](https://facebook.github.io/watchman ) is a tool by Facebook for watching changes in the filesystem. Installing it should
improve performance, but you can also try not installing it, if the installation process is too annoying. You can follow the [Watchman installation guide ](https://facebook.github.io/watchman/docs/install.html#installing-from-source ) to compile and install from source.
2016-05-06 03:25:25 +00:00
< block class = "windows linux android" / >
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
If you plan to make changes in Java code, we recommend [Gradle Daemon ](https://docs.gradle.org/2.9/userguide/gradle_daemon.html ) which speeds up the build.
2016-05-06 03:25:25 +00:00
< block class = "mac ios android" / >
2016-06-08 20:17:19 +00:00
## Testing your React Native Installation
2016-05-06 03:25:25 +00:00
< block class = "mac ios" / >
2016-06-08 20:17:19 +00:00
Use the React Native command line tools to generate a new React Native project called "AwesomeProject", then run `react-native run-ios` inside the newly created folder.
2016-05-06 03:25:25 +00:00
```
react-native init AwesomeProject
cd AwesomeProject
react-native run-ios
```
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
You should see your new app running in the iOS Simulator shortly. `react-native run-ios` is just one way to run your app - you can also run it directly from within Xcode or Nuclide.
2016-05-06 03:25:25 +00:00
< block class = "mac android" / >
2016-06-08 20:17:19 +00:00
Use the React Native command line tools to generate a new React Native project called "AwesomeProject", then run `react-native run-android` inside the newly created folder.
2016-05-06 03:25:25 +00:00
```
react-native init AwesomeProject
cd AwesomeProject
react-native run-android
```
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
If everything is set up correctly, you should see your new app running in your Android emulator shortly. `react-native run-android` is just one way to run your app - you can also run it directly from within Android Studio or Nuclide.
2016-05-06 03:25:25 +00:00
< block class = "mac ios android" / >
2016-06-08 20:17:19 +00:00
### Modifying your app
2016-05-06 03:25:25 +00:00
2016-06-08 20:17:19 +00:00
Now that you have successfully run the app, let's modify it.
2016-05-06 03:25:25 +00:00
< block class = "mac ios" / >
2016-06-08 20:17:19 +00:00
- Open `index.ios.js` in your text editor of choice and edit some lines.
- Hit `Command⌘ + R` in your iOS Simulator to reload the app and see your change!
2015-09-14 14:35:58 +00:00
2016-05-06 03:25:25 +00:00
< block class = "mac android" / >
2016-06-08 20:17:19 +00:00
- Open `index.android.js` in your text editor of choice and edit some lines.
- Press the `R` key twice or select `Reload` from the Developer Menu to see your change!
2016-05-06 03:25:25 +00:00
< block class = "mac ios android" / >
2016-06-08 20:17:19 +00:00
### That's it!
2016-05-06 03:25:25 +00:00
Congratulations! You've successfully run and modified your first React Native app.
2016-05-10 18:16:23 +00:00
< center > < img src = "img/react-native-congratulations.png" width = "150" > < / img > < / center >
2016-05-06 03:25:25 +00:00
< block class = "windows linux android" / >
2016-06-08 20:17:19 +00:00
## Testing your React Native Installation
Use the React Native command line tools to generate a new React Native project called "AwesomeProject", then run `react-native run-android` inside the newly created folder.
2016-05-06 03:25:25 +00:00
```
react-native init AwesomeProject
cd AwesomeProject
react-native run-android
```
2016-06-08 20:17:19 +00:00
If everything is set up correctly, you should see your new app running in your Android emulator shortly.
2016-05-06 03:25:25 +00:00
2016-06-08 20:17:19 +00:00
> A common issue is that the packager is not started automatically when you run
`react-native run-android` . You can start it manually using `react-native start` .
2016-05-06 03:25:25 +00:00
2016-05-09 16:57:21 +00:00
< block class = "windows android" / >
2016-06-08 20:17:19 +00:00
> If you hit a `ERROR Watcher took too long to load` on Windows, try increasing the timeout in [this file](https://github.com/facebook/react-native/blob/5fa33f3d07f8595a188f6fe04d6168a6ede1e721/packager/react-packager/src/DependencyResolver/FileWatcher/index.js#L16) (under your `node_modules/react-native/`).
2016-05-06 03:25:25 +00:00
2016-05-09 16:57:21 +00:00
< block class = "windows linux android" / >
2016-06-08 20:17:19 +00:00
### Modifying your app
2016-05-06 03:25:25 +00:00
2016-06-08 20:17:19 +00:00
Now that you have successfully run the app, let's modify it.
2016-05-06 03:25:25 +00:00
2016-06-08 20:17:19 +00:00
- Open `index.android.js` in your text editor of choice and edit some lines.
- Press the `R` key twice or select `Reload` from the Developer Menu to see your change!
2015-09-14 14:35:58 +00:00
2016-06-08 20:17:19 +00:00
### That's it!
2015-09-15 22:09:32 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
Congratulations! You've successfully run and modified a React Native app.
2015-02-12 04:26:43 +00:00
2016-05-10 18:16:23 +00:00
< center > < img src = "img/react-native-congratulations.png" width = "150" > < / img > < / center >
2016-05-06 03:25:25 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
< block class = "mac windows linux ios android" / >
2016-05-06 03:25:25 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
## Now What?
2016-05-06 03:25:25 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
- If you want to add this new React Native code to an existing application, check out the [Integration guide ](docs/integration-with-existing-apps.html ).
2015-09-14 14:35:58 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
- If you can't get this to work, see the [Troubleshooting ](docs/troubleshooting.html#content ) page.
2015-09-14 14:35:58 +00:00
Publish DocDown Commits Into Next Release (0.29) (#8480)
* Separate Out Core Components Into Individual Parts
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes #8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
* Cleanup troubleshooting and debugging docs.
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
* Remove survey link
Summary:
We have enough responses now and we are in the lockdown for improving the documentation.
We can add another "did we improve?" survey after lockdown sometime.
Closes https://github.com/facebook/react-native/pull/8260
Differential Revision: D3463284
Pulled By: JoelMarcey
fbshipit-source-id: f2d585a8aa6308de0cce0bea3974b1e7f14d5a6f
* Add docs to show how to select specific simulator.
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
* Add ScrollView to Basics docs
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes #8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
* Improve autogen for reference docs including jsdoc support
Summary:
As part of improving the API and Component reference docs #8154 this pull request adds the following:
- jsdoc support for API docs. See the AlertIOS changes as an example.
- type definitions support and added to both API and Component docs. This is supported via react-docgen and jsdoc.
- better formatting of method properties (now shown in a table).
FYI, API and Component docs were previously generated in two different ways. Components were using react-docgen and that basically remains as-is. APIs were using custom parsing code and that's been switched to use a jsdoc parser + react-docgen as an option for typedefs (it could also use the jsdoc parser).
Two docs have been updated to showcase how we'd like the new docs to look:
- AlertIOS (API): showing method parameters, examples, typedefs, more details overall.
- Statusbar (Component): showing method parameters, typedefs, more details overall.
**Note**: To convert new API docs to use the new format, add `jsdoc` to the initial file comment. C
Closes https://github.com/facebook/react-native/pull/8196
Differential Revision: D3465037
Pulled By: lacker
fbshipit-source-id: 78415d44bc5be02db802f5b1f7a0b249689abdf7
* overhaul showcase
Summary:
The motivation is that the showcase is becoming far too large to be useful. I filtered the apps for, basically, "apps that have some sort of interesting news coverage or technical blog post about them". The UI is a bit updated to also mention something about the information link. I also added the FB app itself.
Closes https://github.com/facebook/react-native/pull/8263
Differential Revision: D3463856
Pulled By: JoelMarcey
fbshipit-source-id: cdd309ba85edca417868f14dee7c772f73af654b
* New React Native Landing Page
Summary:
The motivation is that we haven't changed the copy on the initial React Native landing page since launching, and we have a much clearer view of the React Native value prop now.
Themes:
1. React Native is like React but for mobile apps
2. A React Native app is a "real native app"
3. Development is fast
4. You can drop down to normal native development if you need
Closes https://github.com/facebook/react-native/pull/8291
Differential Revision: D3466855
Pulled By: JoelMarcey
fbshipit-source-id: d1a5035640bcd795704d5f830b79e7c3d2e3ab02
* Move Videos and Newsletter to Support
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
* Include info about console.log
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
* Add a new Handling Touches guide
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
* Remove Polyfills section from sidebar
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
* Docs: Basic Components Update
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
* Add react-native-web-player to core components docs
Summary:
This PR adds the interactive [React Native Web Player](http://dabbott.github.io/react-native-web-player/) to the docs. The web player is an embeddable iframe which runs React Native code using components from [react-native-web](https://github.com/necolas/react-native-web). For now, it's primarily for educational purposes, since only the basic components are implemented.
Some details:
- The iframe is loaded from MaxCDN using rawgit, locked down to a git tag.
- Asset paths (i.e. images) are resolved relative to `//facebook.github.io/react-native/`
- When viewed on mobile, it falls back to the syntax-highlighted code blocks.
The WebPlayer can be inserted into markdown by using the fences:
```
```ReactNativeWebPlayer
import ...
AppRegistry.registerComponent ...
`` `
```
![screen shot 2016-06-22 at 12 46 50 pm](https://cloud.githubusercontent.com/assets/1198882/16281068/7056804e-3877-11e6-82f7-ece245690548.png)
I didn't actually add the WebPlayer to any docs pages in this PR. That we c
Closes https://github.com/facebook/react-native/pull/8328
Differential Revision: D3471527
Pulled By: lacker
fbshipit-source-id: 704da41cd77e08c7e2bc820557a74d36e88e8eb7
* More Resources doc, updating Support doc and quickstart too
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
* Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
* Update Navigator component doc
Summary:
Related to #8203 to update the Navigator component reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/navigator.html
![component_navigator_2](https://cloud.githubusercontent.com/assets/691109/16280426/3f2cdc32-3874-11e6-810b-ca34d7bd4972.png)
**Note**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8318
Differential Revision: D3471185
Pulled By: JoelMarcey
fbshipit-source-id: 99f85ee2ab00dc200cf2812cce5b3ccec743d6a0
* fix Firefox bug
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
* Fix guides docs to es2015 classes and remove flowtype from Animation example
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
* Update Views API documentation
Summary:
Ensure all `props` have documentation. Add more details to current `props`.
Provide more information to the API in general.
> Would like to try to integrate the React Native Web Player for the initial
> example, but not right now.
Closes https://github.com/facebook/react-native/pull/8341
Differential Revision: D3475105
Pulled By: caabernathy
fbshipit-source-id: 00ad30b2359831740715517278bec1d0231e089d
* Fixes #8252: Document how to connect to a non-default packager port o…
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
* Add docs pages for basics: Dimensions and Layout
Summary:
These pages should sufficiently give a beginner enough information to make most layouts in React Native. They should go after the basics-style page, whenever that is ready.
Having a single page for Layout was too much, so I split it into two: Dimensions and Layout.
![dimensions react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16311045/c6918b64-3923-11e6-8cc9-daeda9eb40e6.png)
![layout react native a framework for building native apps using react](https://cloud.githubusercontent.com/assets/1198882/16310233/9a66405a-3920-11e6-9ef6-1594f7228e83.png)
lacker
Closes https://github.com/facebook/react-native/pull/8364
Differential Revision: D3477147
Pulled By: lacker
fbshipit-source-id: 1ef31ac0a64e43166a7581b38fa8263282672eeb
* ES6-ify ListView Basics
Summary:
Fixes #8184
Closes https://github.com/facebook/react-native/pull/8370
Differential Revision: D3477196
Pulled By: caabernathy
fbshipit-source-id: 929f84b3f8edaf03f918bb04fb9dbb48b4884b18
* Fix nits in update View API documentation
Summary:
Ref comments in #8341
Ref #8203
Closes https://github.com/facebook/react-native/pull/8361
Differential Revision: D3477174
Pulled By: caabernathy
fbshipit-source-id: 495011c2d370d06d355e966d6ba2c52880146183
* ES6-ify ScrollView basics
Summary: Closes https://github.com/facebook/react-native/pull/8368
Differential Revision: D3477381
Pulled By: caabernathy
fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
* ES6-ify View Basics
Summary: Closes https://github.com/facebook/react-native/pull/8366
Differential Revision: D3477409
Pulled By: caabernathy
fbshipit-source-id: 5906e8dffc7884a6ed527fada5f907702a72c08f
* ES6-ify Image Basics
Summary: Closes https://github.com/facebook/react-native/pull/8365
Differential Revision: D3477411
Pulled By: caabernathy
fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da
* ES6-ify TextInput Basics
Summary: Closes https://github.com/facebook/react-native/pull/8367
Differential Revision: D3477404
Pulled By: caabernathy
fbshipit-source-id: 16c279853b5c7a2d24033ef0d987da52dd148b24
* ES6-ify Text Basics
Summary: Closes https://github.com/facebook/react-native/pull/8363
Differential Revision: D3477431
Pulled By: caabernathy
fbshipit-source-id: 86ee5efb84e50609fbfae82102b1dc61fea69f05
* Update NavigatorIOS component doc
Summary:
Reference: #8203
Changes made:
- Added more to the intro section and updated the intro examples to ES6
- Added more details to prop explanations
- Added parameter descriptions for methods
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/navigatorios.html
![component_navigatorios_2](https://cloud.githubusercontent.com/assets/691109/16315939/1501ba2a-3939-11e6-8ec0-54b43e03b323.png)
Closes https://github.com/facebook/react-native/pull/8334
Differential Revision: D3476066
Pulled By: JoelMarcey
fbshipit-source-id: 9fcefe3f9d59008d8c72683c57cb004d1f185f62
* Update webview doc
Summary:
Reference: #8203
Changes made:
Added a webview example to the intro section
Added more details to prop explanations
Test plan (required)
Ran the website locally and checked: http://localhost:8079/react-native/docs/webview.html
![component_webview_2](https://cloud.githubusercontent.com/assets/691109/16316552/f6847c56-393b-11e6-8fdd-a0b61e7f787b.png)
Closes https://github.com/facebook/react-native/pull/8372
Differential Revision: D3477685
Pulled By: JoelMarcey
fbshipit-source-id: a624f5c6c12a8367aea2a6e7c2e520da7a074bbd
* Move everything out of Known Issues and into more appropriate locations.
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874
* Make a new "Style" doc that's in The Basics and uses the RNWP
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
* Add `extends Component` to Dimensions and Layout Basics Examples
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
* Bring out prop descriptions, for Flexbox
Summary:
For Flexbox API docs would like to tease out the prop descriptions. This PR makes that feasible by exposing the description for style.
**Test plan (required)**
1. Temporarily modified the flexbox source doc: Libraries/StyleSheet/LayoutPropTypes.js to add a description.
2. Checked it out on local webpage: http://localhost:8079/react-native/docs/flexbox.html
![style_prop_descriptions](https://cloud.githubusercontent.com/assets/691109/16321579/866b186e-3952-11e6-823a-2d38132bd553.png)
Closes https://github.com/facebook/react-native/pull/8382
Differential Revision: D3478796
Pulled By: lacker
fbshipit-source-id: 49f3b7876ff1ccec9ee837921a78ee0dfb915453
* Update web player in docs for custom registerComponent names
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
* Networking Guide
Summary:
Simplified Networking Guide, based on the old Network polyfill doc.
This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries.
In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON:
```
fetch('http://facebook.github.io/react-native/movies.json')
```
![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png)
Closes https://github.com/facebook/react-native/pull/8381
Differential Revision: D3479018
Pulled By: lacker
fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
* Move Component Embedded Simulator next to its example
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
* fix bugs on landing page code, make the url an easter egg
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
* Api documentation update for modal.js
Summary:
Related to #8203 to update the Modal API reference doc.
**Test plan (required)**
Started up the website and checked:
http://localhost:8079/react-native/docs/modal.html
![modal update](https://cloud.githubusercontent.com/assets/23874/16316792/ecde19cc-393c-11e6-8136-16243a199d9b.png)
**Note, copied from a previous PR**
The code is not Flow-ified so depended on jsdoc formatting to get the method parameter types. There's a current issue with handling optional types via react-docgen which parses components. There's an open PR to look into this: https://github.com/reactjs/react-docgen/pull/89. When that's resolved the `replaceAtIndex` method parameter type that's documented for `cb` needs to be updated to make it optional.
Closes https://github.com/facebook/react-native/pull/8375
Differential Revision: D3479536
Pulled By: caabernathy
fbshipit-source-id: de2db3aa221e4adce0c0c5f3d94a1fad528a60da
* Update MapView doc
Summary:
Reference: #8203
Changes made:
- Added a MapView example to the intro section
- Added more details to prop explanations
- Added more info to an exported type, even if it's not used anywhere I can see
- Removed mention of ios platform in props. Left an android one in there as I didn't want to touch code.
**Test plan (required)**
Ran the website locally and checked: http://localhost:8079/react-native/docs/mapview.html
![component_mapview_2](https://cloud.githubusercontent.com/assets/691109/16329753/43419508-3999-11e6-9310-11c53ca8c04b.png)
Closes https://github.com/facebook/react-native/pull/8389
Differential Revision: D3481609
Pulled By: JoelMarcey
fbshipit-source-id: 71e35ce49193dc09d40546ff16bc48559135d63f
* Accessing console logs
Summary:
Instructions for accessing the output of a `console.log`.
![debugging](https://cloud.githubusercontent.com/assets/165856/16318119/7aff884e-3942-11e6-9a78-853aaba68308.png)
Closes https://github.com/facebook/react-native/pull/8323
Differential Revision: D3480718
Pulled By: JoelMarcey
fbshipit-source-id: 4185d2e730277b8ad986d3c8904420e7ae1ceb21
* Add Navigation Overview
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
* Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
* Fix errors related to typehint when generating docs
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
* Update Image API
Summary:
- Provide runnable examples
- Add more details to properties and jsdoc-ify the methods
Ref #8203
Closes https://github.com/facebook/react-native/pull/8413
Differential Revision: D3482168
Pulled By: caabernathy
fbshipit-source-id: 04fce5133317af282cced5850a53858e3f5b72f2
* Replace NavigatorComparison with the new Navigation guide.
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
* Overhaul the Flexbox documentation
Summary: Closes https://github.com/facebook/react-native/pull/8395
Differential Revision: D3482652
Pulled By: lacker
fbshipit-source-id: 0bf8955341221b74f69ba24dcf5ab332c910a52c
* Update TextInput API
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
* Make "The Basics" flow like a linear tutorial
Summary: Closes https://github.com/facebook/react-native/pull/8429
Differential Revision: D3487369
Pulled By: lacker
fbshipit-source-id: 59b32f2a2a67370192c91dc43da3d4b76a43b810
* map -> object
Summary: Closes https://github.com/facebook/react-native/pull/8450
Differential Revision: D3488018
fbshipit-source-id: a30269c89e87b546f77da7a32b1c4c65d978459d
* Make the method signatures stand out more
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
* Use npmcdn in docs instead of rawgit for web player
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
* Update instructions for pointing Gradle to Android SDK
Summary:
Closes #8439
Closes https://github.com/facebook/react-native/pull/8446
Differential Revision: D3489034
fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
* Update RunningOnDeviceAndroid.md
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
* improve text input docs
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
* Update Text Component
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
* Fix TextInput API update nits
Summary:
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444537
Ref: https://github.com/facebook/react-native/pull/8392/files/7e7c2b5d57afe451dc5b6ede6b419819e3ac7fbd#r68444442
Closes https://github.com/facebook/react-native/pull/8476
Differential Revision: D3494641
Pulled By: JoelMarcey
fbshipit-source-id: 9a75ff66ccb895deb2f5027bdffe5d5bfe898e41
2016-06-29 10:25:02 +00:00
- If you're curious to learn more about React Native, continue on
to the [Tutorial ](docs/tutorial.html ).
2015-09-14 14:35:58 +00:00
2016-05-06 03:25:25 +00:00
< script >
// Convert < div > ...< span > < block / > < / span > ...< / div >
// Into < div > ...< block / > ...< / div >
var blocks = document.getElementsByTagName('block');
for (var i = 0; i < blocks.length ; + + i ) {
var block = blocks[i];
var span = blocks[i].parentNode;
var container = span.parentNode;
container.insertBefore(block, span);
container.removeChild(span);
}
// Convert < div > ...< block / > content< block / > ...< / div >
// Into < div > ...< block > content< / block > < block / > ...< / div >
blocks = document.getElementsByTagName('block');
for (var i = 0; i < blocks.length ; + + i ) {
var block = blocks[i];
while (block.nextSibling & & block.nextSibling.tagName !== 'BLOCK') {
block.appendChild(block.nextSibling);
}
}
function display(type, value) {
var container = document.getElementsByTagName('block')[0].parentNode;
container.className = 'display-' + type + '-' + value + ' ' +
container.className.replace(RegExp('display-' + type + '-[a-z]+ ?'), '');
}
2016-05-18 16:10:30 +00:00
// If we are coming to the page with a hash in it (i.e. from a search, for example), try to get
// us as close as possible to the correct platform and dev os using the hashtag and block walk up.
var foundHash = false;
if (window.location.hash !== '' & & window.location.hash !== 'content') { // content is default
var hashLinks = document.querySelectorAll('a.hash-link');
for (var i = 0; i < hashLinks.length & & ! foundHash ; + + i ) {
if (hashLinks[i].hash === window.location.hash) {
var parent = hashLinks[i].parentElement;
while (parent) {
if (parent.tagName === 'BLOCK') {
var devOS = null;
var targetPlatform = null;
// Could be more than one target os and dev platform, but just choose some sort of order
// of priority here.
// Dev OS
if (parent.className.indexOf('mac') > -1) {
devOS = 'mac';
} else if (parent.className.indexOf('linux') > -1) {
devOS = 'linux';
} else if (parent.className.indexOf('windows') > -1) {
devOS = 'windows';
} else {
break; // assume we don't have anything.
}
// Target Platform
if (parent.className.indexOf('ios') > -1) {
targetPlatform = 'ios';
} else if (parent.className.indexOf('android') > -1) {
targetPlatform = 'android';
} else {
break; // assume we don't have anything.
}
// We would have broken out if both targetPlatform and devOS hadn't been filled.
display('os', devOS);
display('platform', targetPlatform);
foundHash = true;
break;
}
parent = parent.parentElement;
}
}
}
}
// Do the default if there is no matching hash
if (!foundHash) {
var isMac = navigator.platform === 'MacIntel';
var isWindows = navigator.platform === 'Win32';
display('os', isMac ? 'mac' : (isWindows ? 'windows' : 'linux'));
display('platform', isMac ? 'ios' : 'android');
}
2016-05-06 03:25:25 +00:00
< / script >