react-native-windows | A framework for building native Windows apps with React | Frontend Framework library
kandi X-RAY | react-native-windows Summary
kandi X-RAY | react-native-windows Summary
A framework for building native Windows apps with React.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-native-windows
react-native-windows Key Features
react-native-windows Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-windows
QUESTION
I created a test app with react native via npx react-native init Test --template react-native-template-typescript
(https://reactnative.dev/docs/typescript).
This seems to work fine, although it cant find the typescript template (log as text
| log as pictures).
Now I cd into the created directory with cd Test
, and run npx react-native-windows-init --overwrite
according to the docs. This works fine, log here.
When I now run npx react-native run-windows
as its being said in the documentation, I get the error message Build failed with message Building Solution - error code 1. Check your build configuration
(log here or picture)
What I tried:
- running the rnw-dependencies.ps1 file a) from the pc and b) via
Set-ExecutionPolicy Unrestricted -Scope Process -Force; iex (New-Object System.Net.WebClient).DownloadString('https://aka.ms/rnw-deps.ps1')
in an elevated power shell. This resulted in an big error message when I try to install theCompilers, build tools, SKDs and Visual Studio
. The error message is pretty big, you can find the full log of the powershell here or pictures. - UPDATE: installed every component by hand, now runningrnw-dependencies.ps1
causes no error anymore, everything is Ok; however the build error still persists - installing the
MSVC v143 - VS 2022 C++-x64/x86-Buildtools (latest)
component with Visual Studio - installing the
Windows 10 SDK (10.0.19041.0)
What I am using:
- Windows 10
- nvm
v1.1.7
- node
v14.18.1
, I stepped down because one on the internet suggested that, also available arev17.5.0
andv12.18.3
, both dont work - Visual Studio Community 2022 - 17.1.0 (installed components and workloads picture here)
- npx
v6.14.15
- react-native-cli
v2.0.1
- yarn
v1.22.15
ANSWER
Answered 2022-Feb-20 at 14:47I fixed it by installing the Visual Studio 19 version. Apperently, the 2022 version doesnt work.
QUESTION
I am attempting to download @react-native-community/slider
using expo. Doing this fails
Expo version: 4.12.10 NPM version: lastest(8.1.2)
I've read that you are supposed to add --legacy-peer-deps on https://github.com/callstack/react-native-slider/issues/333
However, you cannot do this with expo.
Logs of powershell output
...ANSWER
Answered 2021-Nov-11 at 13:57Install NPM package first and then used expo
command:
QUESTION
I am trying to create an app using React Native that runs on iOS, Android, macOS and Windows. An advantage of being able to use React Native is that you can share code between platforms.
I am following the setup guides for React Native macOS and Windows, but in the guides, they guide you through creating a new app from scratch for each platform. As I want to use the same app, so I don't have to write the same code twice, I create the macOS app following the guide. Then, in this app, I use the command npx react-native-windows-init --overwrite
from the Windows guide to initialise the Windows platform. But when I then go to run the macOS app using the command npx react-native run-macos
, I get the error:
Cannot find module 'metro-config/src/defaults/exclusionList'
and
One thing I find strange about the setup guides is that for macOS it tells you to use React Native 0.63 and for Windows 0.66. I used 0.66 for both, maybe this is the problem. But if it is, and each platform requires different versions of React Native, how can I use the one app / codebase for both platforms? This goes against one of React Native's core premises:
Create platform-specific versions of components so a single codebase can share code across platforms.
Is it possible to create a single app for both desktop platforms like you would with iOS and Android, and if so, how?
...ANSWER
Answered 2021-Oct-17 at 15:58Yes, you can. You will have to create a mono repo Or you can use mono repo boilerplate. Here is a link to it https://github.com/mmazzarolo/react-native-universal-monorepo
QUESTION
I'm trying to create a React Native Windows application that uses native Windows components that aren't currently wrapped by the React Native Windows library. Specifically the Media Player Element.
I am new to Windows UWP programming and to React Native.
I have created a ViewManager for the MediaPlayerElement following the offical documentation and using the React Native DateTimePicker project as a reference.
The code is compiling and I can debug to see that it is being executed, however when the RN Windows application opens I cannot see my Media Player Element visibly or in the VS Live View Tree or React Native tree view tools.
I've wrapped the MediaPlayerElement using a .idl file and this is called by my MediaPlayerViewManager, which exposes the view to React Native.
My code snippets are below:
MediaPlayerView.idl ...ANSWER
Answered 2021-Oct-14 at 15:12Finally found the solution to this!
I had to implement the Microsoft.ReactNative.IViewManagerRequiresNativeLayout interface. From the React Native Windows documentation:
Your view manager is also able to declare that it wants to be responsible for its own sizing and layout. This is useful in scenarios where you are wrapping a native XAML control. To do so, implement the Microsoft.ReactNative.IViewManagerRequiresNativeLayout interface.
In the context of my example this looks like:
MediaPlayerViewManager.h
QUESTION
I create RN project with npx react-native init "ProjectName"
,and this can be running on iOS and Android simulator. But I want to see it running Windows App on my Mac.
I found this page https://microsoft.github.io/react-native-windows/ , but it looks like here just explain how to build Windows app with WindowsOS.
Is there other side for running Windows app on Mac?
ANSWER
Answered 2021-Sep-02 at 12:30Hi yes you can download the Virtual Machine like VMware
and install Windows then you have to configure the react-native-windows setup your windows in VM and then you can test it on your mac
QUESTION
I created a react native app using
...ANSWER
Answered 2021-Jul-08 at 09:17expo-modules-autolinking is built for esnext. This is why ??
operator is unrecognized in the index.js file.
You can update to node v16
Or recompiled it for es5 by changing target in tsconfig.json of the expo-modules-autolinking module. Then by doing cd node_modules/expo-modules-autolinking
, I recompiled it with npx tsc
command
QUESTION
I tried to install datetime picker for my react-native (expo) project but, when i try to install it;
...ANSWER
Answered 2021-Jun-30 at 14:11After searching for a whole day, i thought to post it here. But just after posting, i got an answer in my mind.
Why not to clone it directly from the github instead of installing it with expo
or npm
.
Did the same thing and now working fine.
This issue was also raised on github but it had no solutions.
QUESTION
Trying to set up react-native development environment with android studio
I have a fault I don't know what to do with it...
Here is the run and feedback from machine:
...ANSWER
Answered 2021-Apr-14 at 08:27Try installing JDK8 and setting the environment variable JAVA_HOME to the JDK8 path
QUESTION
I am trying to link my Django backend with my React Native. Currently I am making a simple GET request to get a JSON object of all the patients in the backend (have only one stored right now if that helps). My call is made like so:
...ANSWER
Answered 2021-Apr-12 at 03:55AVD emulate an actual device so you cannot connect via localhost as the server and emulator are not considered on the same device, can you try point the url to your actual IP address
run ipconfig
on CMD and get the ip as shown in the image
and add it to your code, like:
QUESTION
I am working on an app and whenever I try to install react-native-modal-datetime-picker
package it keeps throwing an error and this is the same for any date time picker package like @react-native-community/datetime-picker
and this is the error that I'm getting:
...ANSWER
Answered 2021-Apr-06 at 11:30This is issue is not completely resolved yet but if you're facing this issue please try installing the package with yarn
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-windows
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page