-
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
Refresh not working as expected in several cases #3240
Refresh not working as expected in several cases #3240
Conversation
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.
LGTM (for WIP)
…-not-working-as-expected * master: Add more information to issue template to help figure out cause of problems (#3239)
@daviscabral Is it ready to merge? |
I think no, could you tell me what issues/difficulties are? |
Just lack of time - helping a friend with some stress test in his server right now - after finishing it I'll push the changes. But what I am doing is to move the logic of I am also extending the test suite - so it's possible to require that every new PR that fixes a bug comes in companion of a test that helps it to come back (and also in future upgrades). |
😲cant wait to see everything functional again, @daviscabral @aksonov |
@daviscabral But how it will solve problems with passing params? |
@aksonov It's not actually directly attached - I am going to finish the changes and show to you here, not sure if this should exactly be merged, as it's probably not just extending/facilitating the use, but might be changing behavior. |
@aksonov after this - could we get a new version? I tried the last time but due the lack of permissions I was not able to publish - so I reverted a few things. Ended doing a little mess here while you was not around. |
@daviscabral Sure, I'll publish new version once this PR is finished. Any ETA? |
Should be there in a few hours - just finishing a few tests here. |
@daviscabral you've managed to resolve the param issue? |
Can't wait to get this update! Thanks @daviscabral |
Please, do not merge yet - I noticed a bug in the I've updated the examples to some of the cases that people complained - but to hide or pass props - it's like @aksonov said before - Below the tab bar toggle working: |
I would appreciate some help testing these changes by the people that were having the problems before we proceed. We might have to update docs too. Any voluntary? |
9c2cd4d
to
d2eebbb
Compare
@daviscabral I will test it now and see if it works in my testcase |
@daviscabral Attempted to see if it worked with the example I posted a while ago (challenge). But it didn't seem to get passed down 🤕 |
@daviscabral I've created a gist with the example I gave, along with the routes structure. |
Can you try this? (just to test if I am correct about the key reference that we need to keep now. If thta's the case - like it happened with React Navigation - it will require some work from everyone to adapt to it.
I believe you are defining the params but they are not passed from top to bottom like before. Also, check this:
|
@daviscabral Can do, but after installing this branch then swapping back to master my app doesn't load the initial scene anymore. Trying to debug that 😨 |
I've been trying to debug it myself from reading through code, but wouldn't the issues be happening with: if (!this[key]) {
this[key] = new Function(
'actions',
'props',
'type',
`return function ${
key.replace(/\W/g, '_') // eslint-disable-line no-new-func
}(params){ actions.execute(type, '${key}', props, params)}`,
)(this, { error: '', ...commonProps, ...props }, type);
} |
I use this to help with the libs I help to maintain: function rn-clean() {
rm -rf android/build
rm -rf ios/build
watchman watch-del-all
rm -rf $TMPDIR/react-*
rm -rf $TMPDIR/haste-*
rm -rf $TMPDIR/metro-*
yarn start --reset-cache
}
For your case - probably worth also remove |
This is the piece that magically generates the methods with scene names. But it calls execute - with type |
@daviscabral Alright, ive cloned down my app again. |
@daviscabral Isn't that magic function the point where it degregates props into the other functions then down to react-navigation? |
You can place a |
@daviscabral 😛 im trying to confirm it for you but my app doesn't want to play nice after changing versions |
Was unable to get the app working again after trying different things, so i'm transplanting things into an application that uses React Navigation for now |
I am getting this in - I can't reproduce that - but it fixed a few other cases and add more examples. |
* master: Allow pop and refresh to receive `key` (#3240)
Some small tweaks in the refresh method and a few new callbacks to allow some work around navigation events in order to get it updated.
Components are mounted at once - from what I could see - still checking it.
This PR will solve #3236, #3218, #3206, #3197, #3188.