Skip to content

next-dev-team/react-next-electron

Repository files navigation

Electron starter

  • Electron JS
  • Typescript
  • ReactJs / UmiJs
  • Antd Design UI / Antd Pro
  • Tailwind CSS

Installation

use yarn for package manager if don't have

# install yarn if not exist
npm i -g yarn
# install package
yarn install

# Run development
yarn dev

Example

// access to electron
const { hello } = window.$api || {};

const Page = () => {
  // access to global react state
  const { counter } = useModel('counter');

  return <Button onClick={() => hello('ElectronJS')}>Hello </Button>;
};