Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/evanbacon/expo-touch-bar-example

Example of creating a custom button in the touch bar using Expo/Electron
https://github.com/evanbacon/expo-touch-bar-example

electron expo react-native touch-bar

Last synced: 2 months ago
JSON representation

Example of creating a custom button in the touch bar using Expo/Electron

Awesome Lists containing this project

README

        

# expo-touch-bar-example
Example of creating a custom button in the touch bar using Expo/Electron

- `expo init myProject`
- `npx @expo/electron-adapter`
- `yarn expo-electron customize`
- `yarn add react-touchbar-electron`

- Modify `electron/main/index.js`

```diff
+ import { touchBarWrapper } from 'react-touchbar-electron';

function createMainWindow() {
const browserWindow = new BrowserWindow({ webPreferences: { nodeIntegration: true } });
+ touchBarWrapper(browserWindow);

```

- Modify `App.js`
```diff
import React from 'react';
import { Text, View } from 'react-native';
+ import { TouchBarProvider, Button, TouchBar } from 'react-touchbar-electron';

function App() {
return (

+
+ {}} />
+
Open up App.js to start working on your app!

);
}

+ export default () =>
```