mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-01-12 17:42:24 +08:00
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:
committed by
GitHub
parent
8f96586970
commit
9cc6c76228
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user