Added react-native-sdk docs#1622
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR introduces comprehensive documentation for the Flow React Native SDK, covering installation, configuration, hooks, and components. The documentation provides developers with a complete reference for integrating Flow blockchain interactions into React Native applications.
Key changes:
- Added main SDK documentation with quick start guide and configuration details
- Added extensive hooks documentation covering both Cadence and Cross-VM operations
- Added components documentation for UI elements like Connect and Profile
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/build/tools/react-native-sdk/index.mdx | Main SDK overview with installation, configuration, and quick start examples |
| docs/build/tools/react-native-sdk/hooks.md | Comprehensive hooks reference covering Cadence and Cross-VM operations |
| docs/build/tools/react-native-sdk/components.md | Documentation for Connect and Profile UI components |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function CustomAuthExample() { | ||
| const customAuthz = (account) => ({ | ||
| ...account, | ||
| addr: "0xCUSTOMOADDRESS", |
There was a problem hiding this comment.
Corrected spelling of 'CUSTOMOADDRESS' to 'CUSTOM_ADDRESS'.
| addr: "0xCUSTOMOADDRESS", | |
| addr: "0xCUSTOM_ADDRESS", |
There was a problem hiding this comment.
kept the same as react-sdk no prob
| import { View, Text, TouchableOpacity } from 'react-native'; | ||
|
|
||
| function CrossVmBatchTransactionExample() { | ||
| const { sendBatchTransaction, isPending, error, data: txId } = useCrossVmBatchTransaction({ |
There was a problem hiding this comment.
The destructured variable sendBatchTransaction is not defined in the UseCrossVmBatchTransactionResult interface. According to the interface definition, the correct name should be mutate or mutateAsync. Update this to use the actual exported property name.
| const { sendBatchTransaction, isPending, error, data: txId } = useCrossVmBatchTransaction({ | |
| const { mutate: sendBatchTransaction, isPending, error, data: txId } = useCrossVmBatchTransaction({ |
| }, | ||
| ] | ||
|
|
||
| sendBatchTransaction({calls}) |
There was a problem hiding this comment.
The function sendBatchTransaction is not defined. Based on the interface definition, this should be either mutate or mutateAsync.
|
|
||
| ## Connect | ||
|
|
||
| A drop-in wallet connection component that handles the entire authentication flow. When disconnected, it displays a "Connect Wallet" button. When connected, it shows the user's address and opens a Profile modal on press. |
There was a problem hiding this comment.
"feel native to React Native development" is repetitive
There was a problem hiding this comment.
I would also add a note that this is built on the same hooks as the React SDK and link to that
No description provided.