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: about 1 year ago
JSON representation
Example of creating a custom button in the touch bar using Expo/Electron
- Host: GitHub
- URL: https://github.com/evanbacon/expo-touch-bar-example
- Owner: EvanBacon
- Created: 2020-02-28T02:10:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T22:54:37.000Z (almost 5 years ago)
- Last Synced: 2025-03-19T07:32:40.864Z (over 1 year ago)
- Topics: electron, expo, react-native, touch-bar
- Language: JavaScript
- Homepage:
- Size: 2.24 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
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 () =>
```