-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
migration to react-navigation v2.x (#3068) #3141
Conversation
aksonov
commented
Jul 22, 2018
•
edited by daviscabral
Loading
edited by daviscabral
- Converting navigators
- Restore original Example demo
- Fix eslint errors (Babel v7, ESlint fixes, React/React Navigation upgrades, mobx removed #3142 @daviscabral)
- Restore original actions like POP_TO checking all other actions like RESET and REPLACE
- Remove mobx
- Fix onEnter/onExit handlers and custom onNavigationStateChange handler (@aksonov)
- Fix navTransparent (@aksonov)
- verify deep linking
@aksonov I've brought your list here - and placed my username beside the item I am planning to tackle first. |
Example/package.json
Outdated
@@ -12,16 +12,16 @@ | |||
"mobx": "^3.2.1", | |||
"mobx-react": "^4.2.1", | |||
"prop-types": "^15.5.10", | |||
"react": "16.4.1", | |||
"react-native": "0.56.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to revert this here? Something that I might help? I was thinking about using the last version for everything. I've spent a couple of days in the past week just to make a few projects to work with these versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please try to fix. I've got some babel-related error, connected with stage 0 or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool - I think I know how to fix them. This might be related to the use of babel 7 (I had to upgrade a few other deps in order to make it to work - checking it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also from:
✖ 538 problems (535 errors, 3 warnings)
To:
✖ 136 problems (133 errors, 3 warnings)
…#3142) * Link to docs and example app in README (#3135) * Babel v7, ESlint fixes, React/React Navigation upgrades, mobx removed * Test circleci config * Typo * Bump node version * Fix missing dep * Test fixes * Wrong deps * Update lockfiles * Update lockfiles * get rid of dist * Tab updates and more lint fixes * Test fix * Fix navigatonStore.reset and more lint errors * Warning for those rules while we are still moving things
I believe you are using the plugin for prettier only - there is a better plugin with support to eslint + prettier on VSCode - better to use that one instead. |
Could you say name of plugin? There is a lot.. |
@aksonov this one: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode You have to enable the ESlint integration:
Also, instead of |
👏 👏 👏 👏 |
@daviscabral I'm done for today. If you have time please fix custom actions, as well replace action, also I found missed labels for two tabs, etc. Btw, I introduced easier custom navigator implementation now - 'renderers', i.e. views for custom navigators, please check OverlayRenderer and LightboxRenderer. |
@aksonov sure - the custom actions are almost done. The missing labels are the next thing to do. |
Oh, also custom onNavigationStateChange handler. |
Got busy with work and couldn't finish what I've started - but planning tackle that later 👍 |
src/navigationStore.js
Outdated
@@ -471,25 +466,69 @@ function uniteParams(routeName, params) { | |||
return res; | |||
} | |||
|
|||
const defaultSuccess = () => {}; | |||
const defaultFailure = () => {}; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad here for removing it - they were not being used before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, you just fixed eslint errors. It was used by removed setState, now I re-enabled handlers.
@daviscabral Please check deep linking if you can, it may not work now.. |
@daviscabral any ETA for REPLACE action? |
Checking it now - back with ETA in a few. |
* Navigation and replace restored
I believe there are still more things besides what is listed in the PR todo list - do you recall anything else @aksonov? |
No, I can’t. Integrating it now into our app and didn’t found any issues yet, will continue tomorrow. If it is ok I want to release it tomorrow as beta.33 if you agree
… On 26 Jul 2018, at 18:19, Davis Z. Cabral ***@***.***> wrote:
I believe there are still more things besides what is listed in the PR todo list - do you recall anything else @aksonov?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sure - good with that. I'll check about the missing action then.
|
Oh, missed texts for two tabs within Example, do you know what it could be?
… On 26 Jul 2018, at 18:34, Davis Z. Cabral ***@***.***> wrote:
Sure - good with that. I'll check about the missing action then.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Checking. |
@aksonov can you elaborate on this to me? // go to first screen of the StackNavigator with reset
// navigation.dispatch(NavigationActions.reset({
// index: 0,
// actions: [NavigationActions.navigate({ routeName: tab.route.routes[0].routeName })],
// }));
// go to first screen of the StackNavigator without reset
for (let i = 1; i < scene.route.routes.length; i += 1) {
navigation.dispatch(NavigationActions.back());
} Why are we using multiple back calls instead of just one single reset there? |
@daviscabral Because reset was buggy and didn't work for sub-tree, feel free to remove it |