Native apps with web technology (React + electron-webpack)

Native apps using react + electron webpack
  1. electron-webpack is a great place to refer the configuration of the app. But i will show the exact steps to get started below 👇
# create a directory of your choice, and copy template using curl
mkdir my-project && cd my-project
curl -fsSL https://github.com/electron-userland/electron-webpack-quick-start/archive/master.tar.gz | tar -xz --strip-components 1

# or copy template using git clone
git clone https://github.com/electron-userland/electron-webpack-quick-start.git
cd electron-webpack-quick-start
rm -rf .git

# install dependencies
yarn
yarn add @babel/preset-react --dev
//renderer/index.tsximport React from 'react'
import ReactDom from 'react-dom'
const Root :React.FC = ()=>{
return(
<div>
<h1 className="heading">hello</h1>
<style>{`
.heading{
color:red;
}
`}</style>
</div>
)
}
ReactDom.render(
<Root/>,
document.getElementById("app"),
)
//tsconfig.json
{
"compilerOptions": {
"jsx": "react"
},
}
npm run dev

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Achuth hadnoor

On my way to be an indie developer, creator creating a focus on better living.