react-native-electron | Electron extensions to React Native for Web | Frontend Framework library
kandi X-RAY | react-native-electron Summary
kandi X-RAY | react-native-electron Summary
This project aims to provide extensions to React Native for Web targeted to the Electron environment to support additional modules exposed by React Native (Alert) or alternative implementations (Linking) using Electron APIs.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates a uri bar .
- Creates a new navBar .
- Select a uri bar
- Returns the new website .
- Compiles a style name
react-native-electron Key Features
react-native-electron Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-electron
QUESTION
How do I tell electron-builder to package react-native-electron instead of react-native? I could not find anything about alias in the electron-builder docs and it's also surprising because it's not a native module so it doesn't contain any .node
files, and webpack (through electon-webpack) has taken care of all the packaging.
This is on Ubuntu.
The development build using the webpack server managed by electron-webpack (with the command electron-webpack dev
) works perfectly.
If I try yarn add react-native
it does build but when I start the resulting app it opens but does nothing.
I also tried to copy the react-native-electron folder and renaming it to react-native. Then it does build but if I start it, it does not even open but I do see it doing nothing in system monitor.
When I try electron-builder install-app-deps
without react-native it errors out with:
ANSWER
Answered 2018-Jun-06 at 15:29Seems like the definition of devDependencies
is a bit different than I'm used to. In this case, packages that would normally just be dependencies are now only used by webpack and not by electron-builder. electron-builder includes the dependencies but not the devDependencies. So all js modules with no native component can be in devDependencies because they don't have to be included in the final electron build because webpack has already bundled them. electron-builder does not look at the webpack config so it does not know about the alias, but as it turns out packages like ract-navigation and their subdependencies (like react-native) should not be in the build twice anyway.
So move everything that should not be included separately to devDependencies and the app will compile. It did not start because of errors but that's another problem probably
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-electron
In order for the APIs exposed by react-native-electron to be accessible in Electron's render process, the following setup must be applied:.
The react-native-electron/main module must be imported in the main process
BrowserWindow instances must be created with the preload script from react-native-electron/preload, for example:
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