Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Built for Mobile

Embedding Bare as a separate thread in a mobile application is easy with Bare Kit. Using Bare Kit and React Native, you can run the same JavaScript as on desktop.

Running

  1. Install all the dependencies:

    npm install
  2. Run your app using on iOS:

    npm run ios

    or on Android:

    npm run android
  3. Open the DevTools to see the console.
    Press j from the CLI.

Snippet

import { Worklet } from 'react-native-bare-kit'

// ...

const worklet = new Worklet()

worklet.start('/app.js', `
  const { IPC } = BareKit
  IPC.setEncoding('utf8')
  IPC.on('data', (data) => console.log(data))
  IPC.write('Hello from Bare!')
`)

const { IPC } = worklet
IPC.setEncoding('utf8')
IPC.on('data', (data: string) => console.log(data))
IPC.write('Hello from React Native!')