chore(docs): add missing imports to opt-out (#3987)

This PR will add missing imports and the default export to `Opt-out` code snippet.
This commit is contained in:
Guilherme de Andrade
2020-07-23 10:15:01 +01:00
committed by GitHub
parent 8f96586970
commit 9cc6c76228

View File

@@ -153,11 +153,11 @@ As Crashlytics will be sending certain information regarding the user, users may
This can be done throughout the app with a simple method call to `setCrashlyticsCollectionEnabled`:
```jsx
import React from 'react';
import { View, Button } from 'react-native';
import React, { useState } from 'react';
import { View, Button, Text } from 'react-native';
import crashlytics from '@react-native-firebase/crashlytics';
function App() {
export default function App() {
const [enabled, setEnabled] = useState(crashlytics().isCrashlyticsCollectionEnabled);
async function toggleCrashlytics() {