Summary:
Making some changes to make this more idiomatic and abide by
the Flipper/FB standards. This one just removes some unused
variables and annotations.
Reviewed By: jknoxville
Differential Revision: D19470676
fbshipit-source-id: 4beb516f00228b1d33e4e1b42d9bc4f8c29af565
Summary: This diff makes sure that the app doesn't die, or dies in a meaningful way if things are misconfigured.
Reviewed By: passy
Differential Revision: D19468273
fbshipit-source-id: 2471c263391906113446af57d795d1199eb1730e
Summary:
This diff creates a sample React Native project (based on the 0.62-rc.0 template).
This example is created like:
(Documenting this here as in the future this might be easier than upgrading the project itself)
1. Run `npx react-native init ReactNativeFlipperExample --version 0.62.0-rc.0`
2. Follow the installation steps to enable Flipper, that is, call `initializeFlipper(this, getReactNativeHost().getReactInstanceManager());` at the end of the `onCreate` method in `MainApplication.java`
3. Put `FlipperTicTacToe` in the root of the project, and call it from `App.js` as a component
4. install `react-native-flipper` as dependency
5. install `relative-deps` as dev dependency, and set it up as shown in `package.json`. This tool make sure that we build and test this project against the version of react-native-flipper in this repository, rather than against the one on NPM.
6. removed some stuff, like tests and linting, which is just in the way in this repo
This PR does not support iOS, as Flipper + RN iOS is still broken in 0.62.0-rc.0, and the current version of react-native-flipper doesn't support iOS yet either.
Documentation on how to set up Flipper in general is not part of this Diff
_N.B. since this is a **public** project, to be visible and runnable by our OSS community, the build setup is kept plain, vanilla, react-native, and **not** wired up to our normal / internal build processes. This is also the reason that lint suggestions beyond the license headers have been ignored. If any others should be applied, it is probably the official react native template that requires updating_
Reviewed By: passy
Differential Revision: D19449295
fbshipit-source-id: 2aeb6044f8dd01f09a95350c84fff2419d685a65
Summary:
This Diff makes the react-native-flipper package available on NPM.
For simplicity and traceability purposes, this package is released every time Flipper is released, under the same version number. Even though there will be often no changes.
Reviewed By: passy
Differential Revision: D19446815
fbshipit-source-id: 485930e57beac42a2f36dc34a8ac82eed2abe785
Summary: Added some assertions and string casts to make plugins a bit more robust
Reviewed By: passy
Differential Revision: D19427909
fbshipit-source-id: 46a3138805db865b538f745fae25ce1897e35736
Summary:
This diff is part of the bigger task T60496135
This diff changes the RN support from crude to decent citizen, making sure we don't recycle callbacks over the bridge, use subscriptions were possible, and making sure connecting, disconnecting, etc works correctly
For example, connect and disconnect hooks should work.
Finally, throw in hot reloading into the mix, which causes the registerPlugin to be triggered another time, without the old one every been unloaded.
This should trigger a new 'onConnect' on the client, to make sure it can restore any state / subscriptions necessary, even though the never disappeared in the Java world.
These cases should all be handled well.
Reviewed By: jknoxville
Differential Revision: D19347330
fbshipit-source-id: de64a08f4043f01528c794430ccc3c717abf0180
Summary:
This diff is part of the bigger task T60496135
This diff is based on D18706643, extracting only the react native module parts
It implements the entire Android client api for JavaScript, so that there is feature parity. However this implementation is happy path only, and edge cases will be handled in separate diffs
Reviewed By: jknoxville
Differential Revision: D19310265
fbshipit-source-id: 589716fe059952bdde98df84ed250c5c6feaa118