Commit Graph

10 Commits

Author SHA1 Message Date
Sebastian Markbage b1da7a5f5d Sync React
Summary:
Syncs the latest changes from the React GitHub repo and takes a dependency on React 16 alpha.

I had to hide the type checker stuff behind `__DEV__` because they now throw in production.

Also disabled flow for findNodeHandle for now since we have some further clean up to do.

Reviewed By: spicyj

Differential Revision: D4526535

fbshipit-source-id: af5d282e75afbb293560b62fc72657461c24bdd1
2017-02-14 20:00:34 -08:00
Janic Duplessis 49311a5d75 Mention that LayoutAnimation has to be explicitly enabled on A…
Summary:
This is mentioned in a different document but we forgot to mention it in JS docs:
- Mentioned here: http://facebook.github.io/react-native/docs/animations.html#layoutanimation
- Missing here: http://facebook.github.io/react-native/docs/layoutanimation.html

**Test plan**

    cd website
    npm install
    npm start

<img width="925" alt="screenshot 2016-11-25 21 48 36" src="https://cloud.githubusercontent.com/assets/346214/20635747/68fe5f6c-b359-11e6-8e72-8f7ca04f79bd.png">
Closes https://github.com/facebook/react-native/pull/11137

Differential Revision: D4233542

fbshipit-source-id: c22b0a05011d4c1c043abee34cd3e9b2369e8772
2016-11-25 15:28:28 -08:00
Tim Yung 7263c349c7 RN: Stop Deep Linking `ReactPropTypes`
Reviewed By: sebmarkbage

Differential Revision: D4025448

fbshipit-source-id: 4e9b6ee002a86f638fc57a4bbeb45bf35fabf74c
2016-10-14 18:59:10 -07:00
David Aurelio 94666f16c7 Auto-fix lint errors
Reviewed By: bestander

Differential Revision: D3683952

fbshipit-source-id: 9484d0b0e86859e8edaca0da1aa13a667f200905
2016-08-09 06:43:46 -07:00
David Aurelio bd60d828c5 Remove `node_modules/react` from the list of discoverable haste modules
Summary: This removes `node_modules/react` from the list of directories that are used for haste module resolutions. Modules required from React are now imported with `require('react/lib/…')`.

Reviewed By: astreet

Differential Revision: D3509863

fbshipit-source-id: 32cd34e2b8496f0a6676dbe6bb1eacc18124c01e
2016-07-05 06:44:33 -07:00
Janic Duplessis d4e7c8a055 Properly validate layout animation config
Summary:
The type key for a layout animation config must be supplied otherwise the app crashes (on Android). I added a isRequired check in JS as well as an explicit exception in java otherwise it crashed at a very hard to debug place. The crash happens when passing null to `Animation.setInterpolator` so this makes sure it never happens.

**Test plan (required)**

Tested that the error is caught properly in JS when passing an invalid animation config like

```
LayoutAnimation.configureNext({
  duration: 250,
   update: { type: undefined }, // or LayoutAnimation.Types.easeInEastOut in my case haha :)
});
```

Also tested the java exception.
Closes https://github.com/facebook/react-native/pull/7958

Differential Revision: D3401760

Pulled By: nicklockwood

fbshipit-source-id: 83c019d863c2b2294405b60e87297c562add0f49
2016-06-07 16:28:29 -07:00
Janic Duplessis baa3668160 Add support for delete animation in LayoutAnimation on iOS
Summary:This adds support for delete view animations in LayoutAnimation for iOS. It supports the same properties as the create animation (alpha, scale).

This allows making simple animations when removing a view which is normally hard to do in React since we need to not remove the view node immediately.

**Test plan**
Tested add/removing views in the UIExample explorer with and without setting a LayoutAnimation. Also tested that the completion callback still works properly. Tested that user interation during the animation is properly disabled.

![layout-anim2](https://cloud.githubusercontent.com/assets/2677334/14595471/86fb1654-050d-11e6-8b38-fe45cc2dcd71.gif)

I also plan to work on improving the doc for LayoutAnimation as well as making this PR for android too.
Closes https://github.com/facebook/react-native/pull/6779

Differential Revision: D3215525

Pulled By: sahrens

fb-gh-sync-id: 526120acd371c8d1af433e8f199cfed336183775
fbshipit-source-id: 526120acd371c8d1af433e8f199cfed336183775
2016-04-25 00:19:25 -07:00
David Aurelio ad8a335864 Remove knowledge of fbjs from the packager
Summary:Follow-up to https://github.com/facebook/react-native/pull/5084

This…
- changes all requires within RN to `require('fbjs/lib/…')`
- updates `.flowconfig`
- updates `packager/blacklist.js`
- adapts tests
- removes things from `Libraries/vendor/{core,emitter}` that are also in fbjs
- removes knowledge of `fbjs` from the packager

Closes https://github.com/facebook/react-native/pull/5084

Reviewed By: bestander

Differential Revision: D2926835

fb-gh-sync-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
shipit-source-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
2016-03-02 04:28:38 -08:00
Nick Lockwood 60db876f66 Wrapped UIManager native module for better abstraction
Summary: public

RCTUIManager is a public module with several useful methods, however, unlike most such modules, it does not have a JS wrapper that would allow it to be required directly.

Besides making it more cumbersome to use, this also makes it impossible to modify the UIManager API, or smooth over differences between platforms in the JS layer without breaking all of the call sites.

This diff adds a simple JS wrapper file for the UIManager module to make it easier to work with.

Reviewed By: tadeuzagallo

Differential Revision: D2700348

fb-gh-sync-id: dd9030eface100b1baf756da11bae355dc0f266f
2015-11-27 07:00:32 -08:00
Eric Vicenti 6f17dba39b [ReactNative] Remove POPAnimation
Summary:
Thanks to @vjeux' work on Animated, we have transitioned away from POPAnimation entirely
2015-08-20 22:24:28 -07:00