GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - caijunjun/vscode-react-native at 5b6b6f72fbf4443223afa3e51a844a085c68c4ef

BranchesTags
Open more actions menu

Latest commit

 

History

260 Commits
260 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
ReactTypings
ReactTypings
 
 
images
images
 
 
js-patched
js-patched
 
 
src
src
 
 
test/SampleApplication
test/SampleApplication
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
.vscodeignore
.vscodeignore
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
ThirdPartyNotices.txt
ThirdPartyNotices.txt
 
 
gulpfile.js
gulpfile.js
 
 
package.json
package.json
 
 
prepareBuild.bat
prepareBuild.bat
 
 
tsconfig.json
tsconfig.json
 
 
tslint.json
tslint.json
 
 

Repository files navigation

React Native Tools (Preview)

This extension provides a development environment for React Native projects. You can debug your code, quickly run react-native commands from the command palette and use IntelliSense to browse objects, functions and parameters for React Native APIs.

React Native features

Getting started

  • Install the extension in VS Code (0.10.8+)
  • Run npm install -g react-native-cli to install React Native CLI (0.1.10+)
  • Set up React Native (0.19+) using the steps detailed on the React Native getting started documentation
  • Open your React Native project root directory in VS Code.
  • (Optional) Enable IntelliSense support (experimental)

Debugging

Setup debug environment

Click the debugging icon Choose React Native debugger in the View bar, and then click the configure gear icon Configure-gear to choose the React Native debug environment.

Choose React Native debugger

VS Code will generate a launch.json in your project with some default configurations such as shown below.

React Native launch configuration file

You can modify these configurations or add new ones to the list. You can use other fields in these configurations as well.

For example, you can modify the target field to specify the simulator you want to target for iOS debugging.

Start debug session

To start the debug session, select a configuration from the Configuration dropdown, and then click the start button Configure-gear (or press F5).

React Native launch targets

You can debug your app on an Android emulator, Android device or iOS simulator. This extension provides experiemental support for iOS devices.

More information about debugging using VS Code can be found in this guide

Debugging on iOS device

Debugging on iOS device would require following manual steps

  • Change the jsCodeLocation IP in your app using the steps detailed here
  • Choose Debug iOS configuration from the Configuration dropdown and press F5.
  • Shake the device to open development menu and select "Debug in Chrome"

Using React Native commands in the Command Palette

In the Command Palette, type React Native and choose a command.

React Native commands

The Run Android command triggers react-native run-android and starts your app for android.

The Run iOS command similarly triggers react-native run-ios and starts your app in iOS simulator (iPhone 6).

The Packager commands allow you to start/stop the React-packager.

Using IntelliSense

IntelliSense helps you discover objects, functions, and parameters in React Native.

IntelliSense

Enabling IntelliSense

React Native IntelliSense depends on experimental features to support JSX in VS Code. To enable these experimental features, you will see the following prompt immediately after opening a React Native project.

IntelliSense prompt

This is a one-time prompt and will enable JSX support. You will need to restart VS Code once for changes to take effect.

You can verify that you have Salsa enabled and you have an installed TypeScript version that supports Salsa by checking the status indicator in the Status Bar. This shows that all is OK

Salsa Enabled

Once you have enabled IntelliSense by following the above steps, you can start typing in the code editor to see the objects, functions, and parameters of your React Native libraries and your own code.

Here is what happens behind the scenes to enable JSX support

  1. The environment variable VSCODE_TSJS=1 is set to enable Salsa
  2. Salsa requires TypeScript 1.8 but the final 1.8 release isn't available yet. Extension installs typescript@next in ~/.vscode
  3. A settings.json file is created in the .vscode directory with typescript.tsdk pointing to the typescript@next install location.
  4. A tsconfig.json file is created in the project root with allowJs: true to allow TypeScript to process JavaScript files.
  5. Typings for React Native are copied into the .vscode directory.

Known Issues

Here is the list of common known issues you may experience while using the extension

Issue Description
Debugger doesn't stop at breakpoints The debugger only works if the packager is started by VS Code. Stop the packager if it is already running outside VSCode.
'adb: command not found' If you receive an error adb: command not found, you need to update your path variable to include the location of your ADB executable.The ADB executable file is located in a subdirectory along with your other Android SDK files.
Targeting iPhone 6 doesn't work There is a known issue #5850 while running an app targeting iPhone 6

Click here for the complete list of known issues.

Disable telemetry reporting

VS Code React Native extension collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more.

If you don’t wish to send usage data to Microsoft, please follow the instructions below to disable its collection.

  • Edit VSCodeTelemetrySettings.json file at ~/.vscode-react-native and add optIn:false.

About

VSCode extension for React Native - supports debugging and editor integration

marketplace.visualstudio.com/items?itemName=vsmobile.vscode-react-native

Resources

Readme
License

Contributing

Contributing
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.