-
Notifications
You must be signed in to change notification settings - Fork 78
[Dev] Update to React Native 0.54 #954
Conversation
Gonna give this a day or two, styled-components just updated to support 0.52 and it's still bit new, will give it more time tomorrow |
The blocker here is on getting the tests to run reliably again, |
All our RN view controllers seem to run fine in-app, just blocked on getting tests to pass now |
I think the issue with Jest + images is because it's not resolving to an - source={1}
+ source={
+ Object {
+ "testUri": "../../../images/paddle.png",
+ }
+ } |
lolz, 0.54 just came out also |
Alright, got test suite green. Next step is to upgrade to the 0.54 RC. |
There are a bunch of yellow box warnings about some of the React life-cycle methods being deprecated, but leaving that in for now. facebook/react#12047 |
@@ -76,12 +76,14 @@ class Sales extends React.Component<Props, State> { | |||
}, | |||
] | |||
|
|||
// The `renderItem` is alway |
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.
^
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.
@orta I guess you probably wanted to leave a note about why renderItem
is set to be () => undefined
?
@@ -1,123 +0,0 @@ | |||
"use strict" |
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.
These transformer
utils no longer needed?
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.
We originally built our own, then https://github.com/ds300/react-native-typescript-transformer was built based on our work and made available for everyone's apps - we migrated to the module now
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.
very nice! I bet a lot of people were psyched on this one
Alright this is now 🍏 and ready. |
@orta bump |
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.
I approve (it's my PR, so I can't actually hit approve)
package.json
Outdated
"lint-staged": "^6.0.0", | ||
"patch-package": "^5.0.0", | ||
"postinstall-prepare": "^1.0.1", | ||
"prettier": "1.9.2", | ||
"react-dom": "16.0.0-alpha.12", | ||
"react-dom": "16.2.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.
this version is inconsistent with react above, dunno if that's an issue: "react": "^16.3.0-alpha.1",
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.
Good spot 👍
"moduleNameMapper": { | ||
"^lib/(.*)": "<rootDir>/src/lib/$1" | ||
}, | ||
"transform": { | ||
"^[./a-zA-Z0-9$_-]+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$": | ||
"<rootDir>/node_modules/react-native/jest/assetFileTransformer.js", |
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.
wanna try jest with this removed before shipping? might have been that @1
requiring 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.
Getting real weird results without this. Might be some cache that I haven’t though of yet, but I also don’t want to dive into another rabbit hole right now.
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.
👍
@@ -72,9 +70,6 @@ describe("state", () => { | |||
sort: "-desc", | |||
}) | |||
|
|||
// Mount it to set up initial state | |||
gene.componentWillMount() | |||
|
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.
makes sense
@@ -76,12 +76,14 @@ class Sales extends React.Component<Props, State> { | |||
}, | |||
] | |||
|
|||
// The `renderItem` is alway |
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.
^
OK, this is good to go on green |
Doing it! |
[@alloy here] This is working now.
0.51 gives us SafeAreaView - which will be needed for iPhone X support
Plus we can do function only components and get HMR 👍