harbour-react-native-runner

0.0.20 • Public • Published

Harbour React Native Runner

Allows you to run facebook instant games api in a webview inside a react-native application.

Usage

Make sure to include "react-native-webview": "^6.9.0" in your package.json.

In your react-native project:

import HarbourWebView from 'harbour-react-native-runner';
 
const _harbourRef = React.createRef();
 
const App = () => {
  return (
    <HarbourWebView
      ref={_harbourRef}
      style={StyleSheet.absoluteFill}
      onPlayer={_onPlayer}
      onLeaderboardList={_onLeaderboardList}
    />
  );
};
 
function _onLeaderboardList() {
 
}
function _onPlayer() {
 
}
 

In your facebook instant game:

Script include dist/harbour-react-native-runner.min.js. It provides a window.FBInstant that is compliant with the facebook instant games api.


Readme

Keywords

none

Package Sidebar

Install

npm i harbour-react-native-runner

Weekly Downloads

2

Version

0.0.20

License

MIT

Unpacked Size

35.4 kB

Total Files

5

Last publish

Collaborators

  • jlake