elm-native-ui icon indicating copy to clipboard operation
elm-native-ui copied to clipboard

Fixes for React Native 0.55

Open nateabele opened this issue 6 years ago • 1 comments

Just got this up and running on React Native 0.55 and React 16. Outside of removing references to NavigationCardStack, NavigationHeader, and NavigationHeaderTitle, the only other change required (in my non-exhaustive test app, anyway) was this patch to makeComponent():

6086,6089c6086
<     return React.createClass({
<       getInitialState: function getInitialState() {
<         return {};
<       },
---
>     return class extends React.Component {
6091c6088,6089
<       onAppReady: onAppReady,
---
>       state = {};
>       onAppReady = onAppReady;
6093c6091
<       componentDidMount: function componentDidMount() {
---
>       componentDidMount() {
6100c6098
<           this.renderer
---
>           this.renderer.bind(this)
6106c6104
<       },
---
>       }
6108c6106
<       renderer: function renderer(onMessage, initialModel) {
---
>       renderer(onMessage, initialModel) {
6111,6112c6109,6110
<         return this.updateModel;
<       },
---
>         return this.updateModel.bind(this);
>       }
6114c6112
<       updateModel: function updateModel(model) {
---
>       updateModel(model) {
6116c6114
<       },
---
>       }
6118c6116
<       render: function render() {
---
>       render() {
6125c6123
<     });
---
>     };

Happy to submit a PR, but obviously this breaks the navigation demo. 😞 Let me know your thoughts. Thanks!

nateabele avatar Jun 07 '18 20:06 nateabele

Uh oh!

I'm actually just now trying to revive https://github.com/opsb/elm-native-expo-counter

@nateabele I allowed myself to use your changes and merge them into https://github.com/akavel/elm-native-ui for use in https://github.com/akavel/elm-native-expo-counter. HUGE THANKS!!!

akavel avatar Jun 07 '18 21:06 akavel