electron-react-boilerplate | highly opinionated boilerplate | Frontend Framework library
kandi X-RAY | electron-react-boilerplate Summary
kandi X-RAY | electron-react-boilerplate Summary
This boilerplate uses: Webpack 5, Babel 7, ESLint (Airbnb style guide), Prettier, Stylelint, SCSS, PostCSS, Electron, React, and Redux (with Redux Toolkit.
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 electron-react-boilerplate
electron-react-boilerplate Key Features
electron-react-boilerplate Examples and Code Snippets
Community Discussions
Trending Discussions on electron-react-boilerplate
QUESTION
I'm building a project based off the Electron React Boilerplate project. I am running MacOS 10.15.7 and node v14.15.1.
I'm trying to install sqlite3
package. Since it's a native dependency, I ran yarn add sqlite3
inside the src/
directory, like it says to do here. The compilation fails with the following output:
ANSWER
Answered 2021-Mar-10 at 22:12I downgraded the sqlite3 package to v5.0.0 and it rebuilt correctly. Hope this helps anyone else with the same issue.
Source: nodejs electronjs sqlite3 - use of undeclared identifier 'napi_is_detached_arraybuffer'
QUESTION
I want to make an Electronjs app with some of the react boilerplates. I guess the best one is the one with the most stars in github, but I am open to suggestions. My goal is to have one window, which is going to be the main one and another one that will be displayed only when the user clicks the Tray(https://github.com/sfatihk/electron-tray-window). What is the best solution, without using a second html and if possible without ejecting.
...ANSWER
Answered 2021-Feb-07 at 14:47You can use Tray in electron for this
Quote from the tray docuentation
Add icons and context menus to the system's notification area.
Example code:
QUESTION
I have cloned electron-react-boilerplate
from GitHub, which comes with Electron 11.0.1:
ANSWER
Answered 2021-Jan-30 at 19:11Electron 11 has a newer version of V8 JS engine which the native module usb@1.6.3
with a version of the std library not set to std=c++14
thus that doesn't support what V8 now requires.
This is known issue and you can read about it at these PRs #376, #394, #400 and the fix has been merged today (January 30 2021) with this PR #407 and there is a new release on NPM usb@1.6.4
.
Now your steps are working for me on Ubuntu 20.04 and ElectronRebuild.js
runs with no errors after installing latest usb
module:
QUESTION
I'm trying to use IPC to communicate between my react component and main electron process. In component :
...ANSWER
Answered 2021-Jan-19 at 22:00ipcRenderer
is the module you should, and do, use in the renderer process (either scripts attached to HTML pages if there is no contextIsolation
, or preload otherwise).
The module to use in the main process is called ipcMain
.
QUESTION
In the Electron Performance docs, the following is said:
In traditional Node.js development, we're used to putting all our
require()
statements at the top. If you're currently writing your Electron application using the same strategy and are using sizable modules that you do not immediately need, apply the same strategy and defer loading to a more opportune time.
So it recommends to allocate resources "just in time" calling require()
just when it is needed. The problem is that I'm trying to use electron-react-boilerplate
and TypeScript doesn't seem to support well this kind of code. Here is an example:
src/main.dev.ts
:
ANSWER
Answered 2021-Jan-12 at 13:28We can use an asynchronous import()
to solve that problem:
QUESTION
I am using the electron-react-boilerplate and want to open a component in a new BrowserWindow. There are multiple questions and answers on how to do this, but none of them are working after packaging the app.
Questions / Answers I've Found:
- How to handle multiple windows in Electron application with React.JS?
- electron-react-boilerplate :sub window on clicking a button
- https://stackoverflow.com/a/47926513/3822043
In my component I have tried to use the following lines to open a new window to a different route.
...ANSWER
Answered 2020-Aug-22 at 23:01Great timing. I was in the same boat the past few days, just figured it out. Except, I didn't change to HashRouter
like you did. Rather I left all the routing stuff as the default electron-react-boilerplate
comes with, like ConnectedRouter
. Maybe either way works.
__dirname
only works in dev. I used DebugTron to check what URLs were being loaded for each resource, and it was file://path/to/app.asar/something
. Then I figured out how to get the path to the asar. This worked for me in both dev and prod, regardless of where the application is located. You also need to set nodeIntegration: true
. Tested on macOS.
QUESTION
I'm trying to use components from dependencies in a project mostly freshly forked from electron-react-boilerplate. The layout is messed up (see pic below). Tried react-chat-window, react-chat-widget, and react-datepicker, so it's across the board. Sorry if this is vague, but I don't know what else to say, and I'm hopefully missing something really basic. Anyone know?
I've also read the electron-react-boilerplate docs. My deps are in ./package.json
as suggested, but I also tried putting them into ./app/package.json
, which breaks it entirely. This SO answer about material-ui didn't help this either.
Here's the relevant part of my page component, pretty much the same as in the example for react-chat-window:
...ANSWER
Answered 2020-Aug-09 at 15:36This page on electron-react-boilerplate, which seems to only be findable via Google and not on their site, pointed me to edit app.global.css
. Seems really wrong that I have to do this when the module already imports its own styles, but it worked:
Replaced the contents of app.global.css with:
QUESTION
I'm using electron-react-boilerplate. It instructs installing by cloning the repo:
...ANSWER
Answered 2020-Jun-26 at 19:43You could do:
git checkout -b some_remote_branchname
git pull origin some_remote_branchname
Then you can merge some_remote_branchname
and local_branch
.
Alternatively, if you want to pull the remote branch into a local brach with a different name, you can pull like this:
git pull origin some_remote_branchname:some_local_branchname
QUESTION
I'm having issues with material-ui (v4.9.5) library running with electron-react-boilerplate. To reproduce:
- follow the installation tutorial
yarn add @material-ui/core
- add some widgets from the library:
ANSWER
Answered 2020-Mar-02 at 16:01It seems that removal of these lines from the main.dev.ts
file solves the problem:
QUESTION
Context
New electron user here. I just cloned and installed the recommended React + Electron repo: https://github.com/electron-react-boilerplate/electron-react-boilerplate
Now I want to use Material-UI. So I thought I just follow the instructions here:
https://material-ui.com/getting-started/installation/
After I did this, the app doesn't show me anything from Material-UI. I created a Component with a simple App Bar. But it does show nothing.
So I found out that there is another package.json in the folder /app/package.json
I cd'd into it and redid the installation. Restart the dev server but still nothing shows up (no appbar, just white screen).
Also according to the docs I should add a link for the roboto font to the html
file. Where is this supposed to go? I put it into the only html file I found in app/app.html
.
How can one set up Material-UI with Electron or rather this specific boilerplate?
I couldn't find anything up to date for this question.
...ANSWER
Answered 2020-Feb-28 at 13:18I found the error. Turns out I imported MenuIcon
but material
doesn't export it. So when I get rid of it, the appbar renders correctly.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install electron-react-boilerplate
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