Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V7 #6422

Merged
merged 29 commits into from Aug 31, 2020
Merged

V7 #6422

merged 29 commits into from Aug 31, 2020

Conversation

guyca
Copy link
Collaborator

@guyca guyca commented Jul 23, 2020

No description provided.

guyca and others added 18 commits July 19, 2020 16:44
Breaking change:

The reason behind that is, there are no pros in handling js location in react-native-navigation
(this feels outside the scope of that library) and there are definitely cons of doing so.

For starters, it forces us to use [BridgeManager as the responder of RCTBridgeDelegate](https://github.com/wix/react-native-navigation/blob/master/lib/ios/RNNBridgeManager.m#L45), which
used to be fine, but..:

with TurboModules there's now a need of responding to other protocols, such as:
- the `RCTCxxBridgeDelegate` ([see here](https://github.com/facebook/react-native/blob/e549f6984e2125969fd11a5b8f4e2df866ac0495/React/CxxBridge/RCTCxxBridge.mm#L368)),
- and the `RCTTurboModuleManagerDelegate` all of which are declared
via the `RCTBridge` initialisation (which happened and still happens in `RNNBridgeManager`)

Changing the responder of `RCTBridgeDelegate` from `RNNBridgeManager` to the actual `AppDelegate` of
the app being built, allows the end user to integrate with TurboModules and customise their code as much as they
want, plus it provides a future proof  way of making sure RNN doesn't break react-native additions
especially since the turbo modules api is fairly new and likely to change.
This PR introduces Coroutines in favor of traditional callbacks in SET. Coroutines promote more idiomatic asynchronous code similar to javascripts async await.
RNN should be agnostic of state management solutions. Redux can be used with the regular registerComponent method:

```js
const myStore = createStore();

Navigation.registerComponent(
    'MyScreen',
    () => (props) => (
      <Provider store={myStore}>
        <MyScreen {...props} />
      </Provider>
    ),
    () => MyScreen
  );
```
When updating FAB options with mergeOptions, id must be passed as well.
* Resolve `Navigation.dismissModal()` with topmost parent `componentId`.
* Resolve `ModalDismissedListener` event with topmost parent `componentId`.
* Remove `componentName` from `ModalDismissedListener` event.
* Replace drawBehind implementation to use constraints - Until now we used `edgesForExtendedLayout` for drawing behind the `topBar` and `bottomTabs`. This is no longer recommended by Apple and the new approach is to use constraints and `safeAreaLayoutGuide`..
* Officially remove iOS 10 support.
* Resolve `setRoot` with root `componentId`
* Resolve `push` with pushed screen `componentId`
* Remove `params` from commandCompletion events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants