The Copy Code Snippets feature lets you grab small chunks of React Native code directly from the chatbox or after edits. It’s designed for quick testing and validation before downloading the full project.
Where to find it
- After every chat response, you’ll see a Copy Code Snippet option in the chatbox.
Types of snippets
- Code Projects → gives you the code for the specific screen currently rendered in its flow.
- Quick edits → provides just the line of code that was edited during an inline edit. Here you get both the “before (orginal)” code and the “after” (modified) code for easy reference.
Example snippet
Prompt:
“Add a login button to the screen.”
Generated snippet (inline edit):
1{/* Header */}
2 <View className="flex-row justify-between items-center px-4 py-3 bg-white">
3 <Text className="text-xl font-bold text-gray-800">Profile</Text>
4 <View className="flex-row gap-4">
5 <TouchableOpacity>
6 <Bell size={24} color="#4B5563" />
7 </TouchableOpacity>
8 <TouchableOpacity>
9 <Settings size={24} color="#4B5563" />
10 </TouchableOpacity>
11 <TouchableOpacity className="bg-blue-500 px-4 py-2 rounded-full">
12 <Text className="text-white font-medium">Login</Text>
13 </TouchableOpacity>
14 </View>
15 </View>
This lets you quickly test the code for the edit you just made.
Why it matters
- Great for testing snippets without downloading the whole project
- Available to all users (free and paid)
- Exporting the entire project is available to paid users