The Draftbit Docs

Welcome to the Draftbit documentation. You'll find comprehensive documentation and information to help you start working with Draftbit as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Custom Screen Code

The Custom Screen Code feature allows you to store functions on a screen-by-screen basis. To access this feature, click Screen Settings (the gear icon on the right of the name of your App) and then click Custom Code in the left sidebar.

After you've saved a function, you can access it in the Actions tab of the Properties Panel by attaching it to any Button or Touchable.

Configuration

Type

Lifecycle Methods

Method

Description

mountEffect

An effect hook invoked immediately after the component has mounted (similar to a React class’s componentDidMount lifecycle function)

useEffect

Invoked immediately after the component has been updated (similar to a React class’s componentDidUpdate lifecycle function)

Name

The name that will be referenced in code to call the function.

Description

A brief explanation of the function's purpose / what the function does.

Packages

Packages from Expo that enable additional functionality on your screen.

Package Name

Description

expo-asset

Package that provides an interface to access Expo's asset system.

expo-av

Package that provides Audio.Sound objects and Video components for managing audio and video playback.

expo-camera

Provides a component to use the device's camera to take photos or record video.

*Must require CAMERA permissions for the camera and RECORD_AUDIO permissions to record video.

expo-barcode-scanner

Provides a component to use the device's camera as a barcode scanner.

*Must require CAMERA permissions

expo-blur

Provides a component that renders a native blur view on iOS and a semi-transparent view on Android. (see: Blur View)

expo-linear-gradient

Provides a component that renders a linear gradient.

expo-permissions

Package that handles asking the user for various device permissions.

expo-sensors

Provides various APIs for accessing device sensors to measure motion, orientation, pressure, magnetic fields, and step count.

Updated about a month ago


Custom Screen Code


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.