-
Notifications
You must be signed in to change notification settings - Fork 452
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
Removed NavigationExperimental dependency #242
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.
Shouldn't the variabls
on the newly added lines actually be variables
Thank you for submitting it, but this issue would persist for anyone using |
According to FB the views exist in react-navigation
|
I replaced navigationexperimental with react-navigation, is there a repo that I can test it with? I don't have any projects that use the header or cardstack. |
@JulianKingman RestaurantsApp in examples uses it, so please try to run an app and verify that everything works... |
Hm, this might take some work. They changed the API for the cardstack in the most recent version, I'm thinking of just switching to the new API. If I can get away with just fixing the current errors, I will (tracking here: react-navigation/react-navigation#1445) |
@JulianKingman Sorry, I was offline few days. Thank you for doing this issue, is there anything I can do to help you? |
Hey guys, what's the status on this? I'm currently referencing the latest commit in this PR until this is merged. I'm under the impression that some components won't work even with the fix now? Is it possible for me to get a list of working components? |
The problem are the navigation components, which rely on NavigationExperimental, which was removed from react in 0.44.0 (I think). |
Please merge this!! I am using react-navigation and I am getting the error: undefined is not an object (evaluating '_reactNative.NavigationExperimental.Header') |
+1, I rely on this PR, but it is causing issues when I use a Tile component:
|
+1, same as @alxvallejo I get the same warning |
+1, same as @jcguarinpenaranda , i get that error. (evaluating '_reactNative.NavigationExperimental.Header') |
Waiting on @SoHotSoup to decide what to do about backwards-compatibility of navigation components. |
Any update on this? |
to anyone having this issue try deleting |
+1 Even the sample cannot be loaded... |
Any updates on this? |
I'm looking into what's involved in using the updated API, assuming that works for @SoHotSoup. Unfortunately, there is no documentation yet (tracking here: react-navigation/react-navigation#1946), so it's kind of trial and error.. |
@SoHotSoup after looking more in depth into the various API's and changes, it seems like the most sensible solution will be to remove navigation from shoutem/ui. I updated my branch accordingly, as well as the restaurant app. The result is a significant simplification of the code. For posterity, here are all the potential options I can think of:
|
My humble opinion is to go for option 3. I don't think shoutem UI Toolkit should include any navigation logic, just UI. Pure UI framework. But this sounds unrealistic.
@SoHotSoup Any plan to do so? Need help? What's the plan at Shoutem to deal with this issue? I guess this is actively being looked into, since you whole ecosystem cannot upgrade to new RN updates. |
I agree with @eightyfive and @JulianKingman, Shoutem UI should only contain the UI components and not the navigation or any other logics. |
While I totally agree about having only the UI and not the logic, would this mean that components like the DropdownMenu would get kicked out since there’s some logic in it? |
@AkdM I don't think Shoutem will ever have a plan to ditch the navigation logic from the Toolkit. It would impact too much their existing product. Let's wait for an input from someone working at Shoutem. |
@eightyfive My guess would be to have two different repos or even branches, one with the fixed Navigation and the other one without. |
Yes, I would like that as well 😄. But unfortunately this is not in our hands. |
@eightyfive we have opted for 3rd solution and we are actively working on moving our main product to use react-nativation. I guess that would be finished and deployed in next few weeks, as part of that task we will remove these navigation components from our UI. |
Great news! Thanks for the update @SoHotSoup 👍 |
@SoHotSoup any update on this? |
any update? i get an error just by importing. making it completely unusable |
what happen with this ? |
Judging by this commit: 3bc0856 shoutem/ui now might be compatible with later versions of React Native which no longer have |
We've resolved it with the commit davidvuong mentioned. I wanted to update the thread immediately but I didn't get a chance to test it out completely. I can now run the Here's my
|
PR no longer necessary |
On a fresh react-native init warning "@shoutem/ui@0.21.1" has incorrect peer dependency "react@^15.0.0".
warning "@shoutem/theme@0.10.0" has incorrect peer dependency "react@^15.1.0".
warning "@shoutem/animation@0.11.1" has incorrect peer dependency "react@^15.0.0". package.json: {
"name": "sample",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"@shoutem/ui": "^0.21.0",
"react": "16.0.0-alpha.12",
"react-native": "0.47.1"
},
"devDependencies": {
"babel-jest": "20.0.3",
"babel-preset-react-native": "2.1.0",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
} |
Hi, i'm facing the same issue - does the fix work with RN 0.44 also or do i have to upgrade to RN 0.47? thanks |
Fixes this issue: #241
RN 0.44.0 eliminated NavigationExperimental, so I copied their style for navigation bar height and put it into the default variables to make it overwritable.