React native windows phone
React Native for Windows
Build native Windows apps with React.
See the official React Native website for an introduction to React Native.
React Native is a framework developed by Facebook that enables you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React. The focus of React Native is on developer efficiency across all the platforms you care about — learn once, write anywhere.
This repository adds support for the Windows 10 SDK, which allows you to build apps for all devices supported by Windows 10 including PCs, tablets, 2-in-1s, Xbox, Mixed reality devices etc.
Status and roadmap
Check out our blog if you’d like to stay up to date on the status of React Native for Windows and check out current and past roadmaps. We will post all new releases, updates and general news about the project there.
You can run React Native Windows apps only on devices supported by the Windows 10 SDK.
For a full and detailed list of the system requirements and how to set up your development platform, see our System Requirements documentation on our website.
See the Getting Started Guide on our React Native for Windows + macOS website to build your first React Native for Windows app.
Search the existing issues and try to make sure your problem doesn’t already exist before opening a new issue. If your issue doesn’t exist yet, try to make sure you provide as much information as possible to us so we can help you sooner. It’s helpful if you include information like:
- The version of Windows, React Native, React Native Windows extension, and device family (i.e., mobile, desktop, Xbox, etc.) where you ran into the issue.
- A stack trace and reduced repro case when possible.
- Ensure the appropriate template is used when filing your issue(s).
See Contributing guidelines for how to setup your fork of the repo and start a PR to contribute to React Native for Windows.
Good First Task and help wanted are great starting points for PRs.
React Native already has great documentation and we’re working to ensure the React Native Windows is part of that documentation story.
React Native for Windows has it’s own separate documentation site where Windows and macOS specific information, like API docs and blog updates live.
- Using the CLI in the Getting Started guide will set you up with a sample React Native for Windows app that you can begin editing right away.
- If you’re looking for sample code, just browse the RNTester folder in the GitHub web UI
The React Native Windows extension, including modifications to the original Facebook source code, and all newly contributed code is provided under the MIT License. Portions of the React Native Windows extension derived from React Native are copyright Facebook.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
About
A framework for building native Windows apps with React.
Как развернуть окружение для разработки приложений на React Native на Windows
Доброго времени суток!
Решив начать разрабатывать приложения на React Native, я столкнулся с проблемами разворачивания окружения. Сегодня я хочу поделиться опытом его настройки.
Конечно, на официальном сайте есть подробное описание, но следуя только этим рекомендациям, было довольно сложно сделать все настройки.
Итак, начнём:
Node, Python2, JDK
- Установить NodeJS. У меня последняя версия на момент написания статьи 10.11.0
- Установить Python2 и JavaSE. Использовался jdk-10.0.2
React Native CLI
- Установим React Native CLI
npm install -g react-native-cli
Android development environment
После запуска выбираем кастомную установку
Далее отмечаем галочкой «Android Virtual Device» и указываем пусть до папки Android — либо оставляем как есть C:\Users\%USERNAME%\AppData\Local\Android\Sdk
Главное, чтобы в пути не было кириллицы!
Особенно с этим могут возникнут проблемы в будущем. Например, у меня имя пользователя системы было на кириллице «C:\Users\Александр», и после запуска приложения grandle не мог найти путь, т. к. путь выглядел как «C:\Users\. \. »
Нажимаем «далее». Оставляем рекомендуемый объем оперативной памяти, нажимаем далее и устанавливаем.
Android SDK — открываем студию и переходим в настройки
Appearance & Behavior → System Settings → Android SDK.
На вкладке «SDK Platforms» включаем галочку «Show Package Details» и для «Android 8.0 (Oreo)» устанавливаем:
- Android SDK Platform 26
- Intel x86 Atom_64 System Image
- Google APIs Intel x86 Atom_64 System Image
Теперь выбираем вкладку «SDK Tools», включаем галочку «Show Package Details»
и устанавливаем пакет
Переменные среды
- ANDROID_HOME
Создадим переменную для ANDROID_HOME:
- Имя переменной ANDROID_HOME
- Значение переменной (можно посмотреть в Android Studio)
По аналогии создадим переменную JAVA_HOME:
- Имя переменной: JAVA_HOME
- Значение переменной: C:\Program Files\Java\jdk-(версия)
Добавим 4 значения:
Создаем приложение и запускаем эмулятор
- Переходим в удобную для нас папку в консоли и набираем:
react-native init MyTestProject - Открываем в Android Studio наш проект и открываем AVD Manager
Если AVD не скачан, скачиваем и запускаем
Далее переходим в консоли в папку с приложением и набираем:
react-native run-android
После чего нашел приложение запустилось.
В этой статье использовались официальное руководство от React Native
+ личный опыт!
Надеюсь, эта статья поможет тем, кто столкнулся с проблемами или решил начать разрабатывать нативные приложения на React
Can you use React Native to create a desktop application?
I’m making a desktop application with create-react-app and Electron. It needs to run on Mac, Windows and Linux. I also want to make a native version afterwards for Android and iOS.
Can I just make an application in React Native that works on mobile devices and on desktops? It would maybe save a lot of time.
7 Answers 7
Try Proton Native. It uses the React Native syntax for building desktop applications without Electron.
There isn’t any official support for desktop applications in React Native, at least as of January 2018.
There are, however, various experimental forks of React Native for desktop platforms such as react-native-windows for Univeral Windows Platform, react-native-macos for Mac and react-native-desktop for Linux. They’re not developed by the main RN team, though, so your milage may vary.
Microsoft announced a library for targeting Windows desktop, Xbox, and Windows tablets last week. And the Tech Crunch article on it also links out to an experimental Mac library.
I wouldn’t say desktop support is mature, but it’s growing.
Recently I came across this project. Check it out:
I have not used it, but it looks promising and serves to make desktop applications with React.
Can I just make an application in React Native that works on mobile devices and on desktops? It would maybe save a lot of time.
By the way, if you are looking to create a performant cross-platform application for mobile, desktop, and web from a single codebase, maybe you should try Flutter.
It seems like Proton Native has added support for styling and layouts. You should check that project too. I used it some time ago when it was based on libui, but now is based on its own binding of Qt.
On Windows the Microsoft team officially added the support of React Native to Windows.
The MacOS part seems to be still a work in progress, but you can find a fork of Facebook/React Native here: https://github.com/microsoft/react-native
Now Microsoft is fully investing in React Native for Windows which allows you to build applications for all devices supported by Windows 10, including PCs, tablets, 2-in-1 PCs, Xbox, mixed reality devices, etc.
Microsoft React Native also has support for macOS.
Seems like quit a bit has changed in two years since this post was made. I wanted to give an update.
Currently, these projects going on.
React Native Windows — React Native support for Microsoft’s Universal Windows Platform (UWP) and the Windows Presentation Foundation (WPF)
React Native DOM — An experimental, comprehensive port of React Native to the web. (Not to be confused with React Native Web, which has different goals)
React Native Turbolinks — React Native adapter for building hybrid apps with Turbolinks 5.
React Native Desktop — A project aiming to bring React Native to the Desktop with Qt’s QML. A fork of React Native Ubuntu, which is no longer maintained.
React Native macOS — An experimental React Native fork targeting macOS and Cocoa
React Native tvOS — adaptation of React Native for Apple tvOS alita — An experimental, comprehensive port of React Native to mini-program(微信小程序).
Proton Native — A wrapper for React Native, using Qt to target Linux, MacOS, and Windows.