Skip to main content

React Native (TSX)

React Native is a framework for building mobile apps using React and React Native. React Native support in LiveCodes is achieved by using React Native for Web (an accessible implementation of React Native's Components and APIs that is interoperable with React DOM).

Demo

show code
import { createPlayground } from 'livecodes';

const options = {
"template": "react-native"
};
createPlayground('#container', options);

Usage

For usage and examples, see documentation for JSX.

Language Info

Name

react-native-tsx

Extension

.react-native.tsx

Editor

script

Compiler

TypeScript compiler and React Native for Web

Code Formatting

Using Prettier.

Custom Settings

Custom settings added to the property react-native-tsx are passed to the TypeScript compiler as compiler options while compiling TSX. In addition, the option disableAutoRender can be set to true to disable auto-rendering.

Please note that custom settings should be valid JSON (i.e. functions are not allowed).

Example:

Custom Settings
{
"react-native-tsx": {
"disableAutoRender": true
}
}

Starter Template

https://livecodes.io/?template=react-native (uses JSX)