react-electronic
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

React Electron

Declarative way to manage windows in an Electron application with React.

Work In Progress - This is currently a quick-and-dirty prototype.

Install

yarn add react-electronic

Usage

import React from 'react'
import { App, BrowserWindow, createWindowContainer } from 'react-electronic'
 
const container = createWindowsContainer()
 
render(
  <App>
    {
      state.notes.map(note =>
        <BrowserWindow
          key={note.id}
          url='https://github.com'
          vibrancy='dark'
          height={640}
          width={480}
          autoHideMenuBar={true}
          titleBarStyle='hidden-inset'
          onClose={() => store.dispatch(
            closeNote(note.id)
          )}
        />
      )
    }
  </App>,
  container
)

Readme

Keywords

none

Package Sidebar

Install

npm i react-electronic

Weekly Downloads

5

Version

0.2.0

License

MIT

Unpacked Size

9.2 kB

Total Files

18

Last publish

Collaborators

  • kube