aomader / electron-es6-react Goto Github PK
View Code? Open in Web Editor NEWMinimal demonstration how to use React and ES6 with Electron.
License: MIT License
Minimal demonstration how to use React and ES6 with Electron.
License: MIT License
How can i get css and scss support to electron by importing scss or css files.
Hi,
thank you very much for your minimal boilerplate code. Finally a really minimal example! ๐
One thing that should be modified though, is the react DOM rendering.
Rendering with
ReactDOM.render(<Main />, document.body);
results in a chromium warning
warning.js:36 Warning: render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.
The better solution:
Change the rendering call to
ReactDOM.render(<Main />, document.getElementById('react_container'));
and add the following between the tags of the index.html file:
<div id="react_container"></div>
Warning will then go away and the example stays minimal :-)
Best wishes,
Martin
Have you noticed how require('babel-register')
is really slow? To see the changes I run a ctrl+R
and it takes ~5 seconds to show the changes.
Hey, since babel updated to 6.0.0 apparently not too long ago, it changed a bit of it's packages around...
require('babel/register');
Will no longer work.
Their new registry package is under babel-core/register
, however simply replacing the current registries with that one in the scripts didn't work for me... They may have changed it up quite a bit from what it used to be.
I couldn't figure out a solution... So you may want to poke around in babel-core a bit and see if you can figure it out yourself, or just use the older version of babel.
Just wanted to thank you for this..I was exactly looking for something like this :)
Is there any chance of licensing the source of your example for use?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.