Skip to content

Create a copilot-instructions.md in the template #175

@horner

Description

@horner

When running "npx react-native init MyApp"

It would be nice to have a copilot-instructions.md like so?

# Copilot Instructions

This project was generated with [React Native](https://reactnative.dev).

To get the most out of GitHub Copilot (or other AI coding assistants) while working on this codebase:

## General Guidance
- **Keep prompts specific.** Mention whether you’re targeting iOS, Android, or both when asking for help.
- **Reference APIs.** Copilot responds better if you include the React Native API name (e.g. `FlatList`, `useColorScheme`, `StyleSheet`).
- **Ask iteratively.** Start with small, scoped requests (e.g. *“generate a button component with onPress logging”*), then refine.

## Common Use Cases
- **UI Components**  
  Ask Copilot to scaffold screens, navigation stacks, or UI elements.  
  Example: *“Generate a login screen using React Navigation with two TextInput fields and a button.”*

- **Platform-Specific Code**  
  Specify iOS or Android if you need native modules, permissions, or configuration.  
  Example: *“Show me how to request camera permission on Android using React Native.”*

- **Testing**  
  Copilot can generate Jest/React Native Testing Library test cases.  
  Example: *“Write a test for a Button component that ensures onPress is called.”*

## Best Practices
- **Review suggestions carefully.** Copilot may propose outdated APIs—always verify against the [React Native docs](https://reactnative.dev/docs).
- **Keep context short.** Too much boilerplate in your prompt may confuse the assistant.
- **Use version awareness.** If you upgrade React Native, check that Copilot suggestions match the new APIs.

---

Happy coding with React Native 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions