Closed GTDev87 closed 7 years ago
Ended up not being necessary. Found a way around using it.
@GTDev87 Sorry, I've missed this PR due to the way GitHub notifications work. Can you document how you went around it?
Sure. Been trying to do a todoMVC on react native to learn Elm (and react native).
Have local images working with a combination of these 2 files.
https://github.com/GTDev87/elm-native-ui-todo-mvc/blob/master/app/Native/Image.js https://github.com/GTDev87/elm-native-ui-todo-mvc/blob/master/app/Image/Image.elm
Just treats them as integers. Seems to work.
Seems that react native when requiring an image example:
const checked = require('./app/Task/Images/checked@2x.png');
, the returned opaque type returned as an integer. This allows it to be passed through into the source field of images. https://facebook.github.io/react-native/docs/image.html#defaultsource.Still learning elm so this is a quick and dirty pass through. I can also try and modify the Source type to accept
Int
.