2.1.0 • Published 3 years ago
@claimr/react-native-client v2.1.0
Installation
Using NPM:
npm install @claimr/react-native-client
Or Yarn:
yarn add @claimr/react-native-client
Usage
import { ClaimrClient, useLazyVerifiedLocation } from '@claimr/react-native-client'
import { Text, Button } from 'react-native'
const client = new ClaimrClient({ apiKey: 'YOUR_API_KEY' })
const MyModule = () => {
const { claim, jwt, submit } = useLazyVerifiedLocation({ client })
return (
<>
{submit && <Button onPress={submit} title={'Submit'} />}
{claim && (
<Text>
{claim.location.latitude}, {claim.location.longitude}
</Text>
)}
</>
)
}
API documentation can be found here.
Example
See an example on how to use this module in examples
.
To run it, first create a .env
file in the example
folder where you add your ClaimR API Key. You can get a key at https://dashboard.claimr.tools.
# Copy the template
cp example/.env.template example/.env
# Open the .env file using your favorite editor
vim example/.env
Then you can start the example app by running:
yarn example android
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
2.2.0-rc.0
3 years ago
2.2.0-beta.0
3 years ago
2.1.0
3 years ago
2.1.0-beta.0
3 years ago
2.0.0
3 years ago
1.3.2
3 years ago
1.3.1
3 years ago
1.3.0
3 years ago
1.2.5
3 years ago
1.2.4
3 years ago
1.2.3
3 years ago
1.2.0
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.1.0
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.2.1
4 years ago
0.2.0
4 years ago
0.1.0
4 years ago