Skip to content

ReactNative >= 0.44? #216

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

Closed
vinils opened this issue Aug 21, 2017 · 25 comments
Closed

ReactNative >= 0.44? #216

vinils opened this issue Aug 21, 2017 · 25 comments

Comments

@vinils
Copy link

vinils commented Aug 21, 2017

Hey guys, I´ve seen that there is some break changes on react native >= 0.44 but i couldn't find any feed back on when that will be done.
I´m waiting for >= 0.45 and just kindle would like to know how that is going on? Any news or an idea when that will happen?

Tks

@ms-deregtd
Copy link
Contributor

We're internally testing bumping our own software up to 0.46, but haven't yet found anything we've needed to change in ReactXP. Is there something you're running into that's not working on a newer RN?

@vinils
Copy link
Author

vinils commented Aug 22, 2017

Don´t wanna make this issue very complex but essentially I´m trying to integrate with expo for many good reasons and my problem is to fix this reference's puzzle.

I´ve seen some issues about break changes on 0.44 opened here (example: @erictraut mentioned on #83).

Just would like to know if and when would be possible to run reactxp with RN 0.45 and react "16.0.0-alpha.12"?

An project with those reactxp references bellow would fix that ;)

My project has those reference below and expo with typescript requires 0.45 because of "react-native-typescript-transformer".

"devDependencies": {
"@types/node": "^7.0.12",
"@types/webpack": "^2.2.14",
"awesome-typescript-loader": "3.1.2",
"source-map-loader": "^0.1.6",
"ts-node": "^3.0.2",
"typescript": "2.1.6",
"webpack": "2.2.1"
},
"dependencies": {
"react": "^15.4.1",
"react-dom": "^15.4.1",
"react-native": "^0.42.0",
"react-native-windows": "^0.33.0",
"reactxp": "0.42.0-rc.9",
"reactxp-imagesvg": "^0.2.1",
"reactxp-video": "^0.1.3",
"reactxp-virtuallistview": "^0.1.3",
"simplerestclients": "0.0.18"
}

Expo references
"dependencies": {
"expo": "19.0.1",
"react": "16.0.0-alpha.12",
"react-native": "https://github.com/expo/react-native/archive/sdk-19.0.0.tar.gz"
},
"devDependencies": {
"@types/react": "15.0.39",
"@types/react-native": "0.46.7",
"react-native-typescript-transformer": "1.1.3",
"typescript": "2.4.2"
}

expo X react X react-native references

Any suggestion are very welcome :)

@ms-deregtd
Copy link
Contributor

I'm saying that, since we made that post, it looks like the breaking changes are unrelated to things that ReactXP uses, so you should be able to just use RN 0.44+ directly. Have you tried just using the new version and you're running into issues?

@vinils
Copy link
Author

vinils commented Aug 22, 2017

Sorry, my bad. I thought you weren't aware of that.

I´m still investigating that but

image

"react": "16.0.0-alpha.12",
"react-dom": "16.0.0-alpha.12",
"react-native": "0.45.1",
"reactxp": "0.42.0-rc.20",

@dryganets
Copy link
Contributor

react-native removed ExperimentalNavigation framework we are using on iOS and Android.

@vinils
Copy link
Author

vinils commented Aug 22, 2017

Any workaround?

@ms-deregtd
Copy link
Contributor

We are working on releasing our navigation framework as a reactxp extension. Trying to get something out by EOD. It's basically the extracted 0.42 RN experimentalnavigation module + a web equivalent as a common navigation module. Once that's extracted then you should be able to use the rest of reactxp as is on 0.44+.

@Fitzpasd
Copy link
Contributor

Workaround in the meantime: Don't use the Navigation API in reactxp, and comment out line 33 in node_modules/reactxp/dist/native-common/NavigatorExperimentalDelegate.js

...
var Types = require("../common/Types");
// var StateUtils = Navigation.StateUtils;
var NavigatorExperimentalDelegate = (function (_super) {
...

@vinils
Copy link
Author

vinils commented Aug 24, 2017

Perfect, @Fitzpasd! that´s worked as a charm and now I can move on!

I'll make a simple navigation api just to move forward with my simple version and wait for the official one.

Please if you could take in consideration to release a reactxp version without Navigation first, even before to start working on the navigation framework extension, would help me to keep sync with reactxp.

Even though, Thank you guys for this awesome and responsive help!

@dryganets
Copy link
Contributor

@vinils, I'm on it.

It turns out to be a little bit more complex than I thought initially.
If you depend on the RX.Navigation you could try to use reactxp-navigation v1.0.1, it should work - I'm doing compatibility testing now.

You could use the branch with navigation removed while I'm trying to sort everything out.
#145

@vinils
Copy link
Author

vinils commented Aug 24, 2017

@dryganets Great!
What about @LeJPR attempt on #9 and github? Any similarity?

@dryganets
Copy link
Contributor

No, I'm not trying to integrate react-navigation, now.

We open-sourced experimental-navigation with our changes so that framework works for you the same way it works for us in skype for iOS and Android.

You could develop a custom delegate with different API encapsulated inside now. But it has a limitation - you need to have a control over the navigation stack of your framework.

@vinils
Copy link
Author

vinils commented Aug 24, 2017

I follow on reactxp-navigation and got the error bellow
image

Dependencies:
"react": "16.0.0-alpha.12",
"reactxp": "0.42.0-rc.20",
"reactxp-navigation": "1.0.4",
"react-native": "0.47.2",

not fully aware of react-native navigation changes but seems NavigationExperimental is not being take from react-native-deprecated-custom-components

I´m still looking the error but I´m posting that because @dryganets may would like to know and that's on my target to get reactxp on RN >=0.45

@dryganets
Copy link
Contributor

@vinils
I see. need to figure out another way to check which version of react-native we run on.
I forget that standard navigation is defined in react-native after depreciation as a throwing component.

The more interesting question is why are you getting standard navigation on Android.
The default selector now should return ExperimentalNavigator for Android and iOS.

@vinils
Copy link
Author

vinils commented Aug 24, 2017

I saw this issue on 1.0.4. So far i tried on 1.0.1 but i got another error.

@dryganets
Copy link
Contributor

dryganets commented Aug 24, 2017

the hot fix for you now is to pass NavigatorDelegateSelector imported from the common/Navigator.
This is a left over from the previous implementation. Was done to don't expose our internal dependency accidentally.
I'll fix it soon, thank you.
I got the samples working as they are using react-native 42.
And it works for our project as I'm passing the default delegate.

import { Navigator, NavigatorDelegateSelector } from 'reactxp-navigation';

<Navigator
        renderScene={ this._renderScene }
        navigateBackCompleted={ this._navigateBackCompleted }
        transitionStarted={ this._transitionStarted }
        transitionCompleted={ this._transitionCompleted }
        ref={ this._onNavigatorRef }
        cardStyle={ cardStyle }
        delegateSelector={ NavigatorDelegateSelector }
/>

@dryganets
Copy link
Contributor

@vinils, I published 1.0.5 with this bug fixed.
If you are using the StandardNavigation please make sure that you have your style not cached by react-native:

RX.Styles.createViewStyle({
        backgroundColor: SXStyles.color.transparent
}, false);

false turns off the caching for this style in react-native and the scene style would be passed as a string, not as an integer.
I would recommend you to try NavigatorDelegateSelector if you plan to stick to the API.
In case of the big application, you will benefit as the performance of ExperimentalNavigation is way better.
The difference is that ExperimentalNavigation is driven by the native code and js stalls don't pause navigation animation.

@vinils
Copy link
Author

vinils commented Aug 25, 2017

@dryganets Worked!!!! simple tested on web/android.

I have the HelloWorld running with expo, need some adjusts, but any changes to became a contributor and publish that on reactxp samples?

related to #208

@vinils
Copy link
Author

vinils commented Aug 25, 2017

Btw @dryganets , an issue with reactxp-imagesvg (seems references problems :/)

image

@vinils
Copy link
Author

vinils commented Aug 25, 2017

and on reactxp-video

image

@dryganets
Copy link
Contributor

dryganets commented Aug 25, 2017

Yep, I know :(

There are a couple of samples which are linked to the version of react-native-video which doesn't work with react-native 0.42 because it ships react-native-window.

I didn't figure out a good workaround for this. Tried blacklisting and .flowconfig, no luck so far.
Likely I'll end up updating the broken extensions.
As a workaround, you could remove the node_modules folder from node_modules/react-native-video folder after npm install.

I'm going to go through all of the samples and make it work out of the box.

My priority was to unblock you first.
Sorry about broken samples ...

@vinils
Copy link
Author

vinils commented Aug 25, 2017

No worries, they are not blocking me at the moment :) I can move on other stuff first but video would be at the end of the next week. if you could start by that.

@dryganets
Copy link
Contributor

dryganets commented Aug 25, 2017

Regarding the expo change. Just make a pull request.
The bot will ask you to sign a contribution agreement, once it is done you are all set.

I would make a separate sample for the expo to make it distinct.

@vinils
Copy link
Author

vinils commented Aug 25, 2017

Not sure if that would apply to you.. but i got some problems on typescript 2.4.1 fixed on 2.4.2

@dryganets
Copy link
Contributor

#229
should fix issues with video samples.
You could use it as an example.
reactxp-video 0.2.0 is already published to npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants