Configuring VSCode for React Native App Development
Jun 1, 2021
Extensions that will make our lives easier with React Native development
- React Native Tools — built by Microsoft, we can debug react native apps inside VSCode.
- React-Native/React/Redux snippets — Gives us a bunch of code snippets
- Prettier — For code formatting
- Material Icon Theme — With this extension installed, we get material icons
Need to set default code formatter to Prettier using below configuration.
Code -> Preferences -> Settings -> Search for "defaultformatter" -> Select "Prettier - Code Formatter"
One other setting in VSCode which we can use for code auto-formatting.
Code -> Preferences -> Settings -> Search for “formatonsave” -> Enable the option
The moment we save our changes, our code gets re-formatted. VSCode will use Prettier to format our code.