Show Gameball User Profile

Show your user's profile including all details, user challenges, and the leaderboard on React-native app.

Gameball’s views are accessible through the code below. Note the you must first register your API Key and a player before accessing the views.

First import Gameball Player Profile widget.

import {GameballWidget} from 'react-native-gameball';

There are two ways to view the widget.

Show as standalone screen

<GameballWidget />

Show as Modal


and then to open the widget you need to call the openWidget function on the ref property of the widget

Example on running the widget as a Modal:

return (
      <View style={{ flex: 1 }}>
          title={'open widget'}
          onPress={() => this.widget.openWidget()}
          ref={(ref) => this.widget = ref}

Last updated