• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

ohanhi/elm-native-ui: [CLOSED] Experiment: mobile apps in Elm using React Native ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

ohanhi/elm-native-ui

开源软件地址(OpenSource Url):

https://github.com/ohanhi/elm-native-ui

开源编程语言(OpenSource Language):

Elm 75.9%

开源软件介绍(OpenSource Introduction):

Elm Native UI Build Status

THIS PROJECT IS NOT MAINTAINED. If you want to become the maintainer, see issue #90. The code is from 2017 and the facilities used here are not applicable to current versions of Elm.

Experimental support for writing native iOS and Android applications in the beautiful functional Elm language. This project builds on Facebook's React Native, using it as the JavaScript environment for Elm.

Frequently Asked Questions

Is This Production Ready?

No. This is really just an experiment, and it is not under active development. People have used it for applications despite this.

Why React Native?

Mobile applications are expected to look and feel at home on the device and the OS it is running. This goal cannot really be achieved with a WebView-based solution (such as Cordova). React Native applications use the same pieces of UI as an app built with Objective-C or Java, choosing the platform-specific native variant of the UI feature for you.

Will it always be React Native?

In the long term, not necessarily. The ultimate goal would be for Elm Native UI to be a standalone project, complete with the mobile platform groundwork that has been put into React Native already. It has not been fully assessed how much work this would in reality entail.

Addendum 2017-10-17: elm-ios was a Google Summer of Code project that explored this idea for iOS.

Get it running

Caution: Experimental software!

Elm Native UI may get breaking changes at any time, and it might only work with an older version of React Native.

Actually getting it running

Install React Native following their guide. Check that you can create a new project:

$ react-native init MyAppName --version 0.44.3

and try running it on a real or virtual device.

Once that works, clone this repository in the same directory where you ran react-native init in. You should have a directory structure similar to this:

│
├── elm-native-ui
└── MyAppName

Go ahead and copy the files from the examples/Counter folder into your React Native app directory now.

Now try to compile the Elm code with

$ npm run compile

This will create the elm-package.json and elm-stuff for you, even though it won't compile yet.

Edit the index.*.js files' last lines in case your React Native app is not called 'MyAppName' at this point. You may also need to rename the project in the package.json file.

You can then use e.g. elm_self_publish to publish the Elm Native UI package into our project.

Assuming we're in the parent directory where elm-native-ui reside:

$ python path/to/elm_self_publish.py ./elm-native-ui ./MyAppName

Now we are ready to rock!


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap