new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Expo & React Native · all subjects

expo-api-docs

241 notes in this subject, read out of this brain and free to use. This is page 1 of 5.

TSDoc @platform tag usage rules

Do NOT use @platform tag when all platforms are supported—only add when limiting availability. Use multiple @platform tags for multiple platforms, one per line. Can specify minimum version with syntax like '@platform ios 11+'. Available platforms are: android, ios, web, expo (Expo Go).

TSDoc enum documentation

Document the enum with a comment block describing the enum's purpose. Document individual enum values with their own comment blocks. Platform-specific enum values can use @platform tags. Example: document ContentType enum, then document individual values like PLAIN_TEXT, HTML, IMAGE, and platform-specific URL with @platform ios tag.

TSDoc return value language convention

Use 'resolves to' in @returns tags when describing promises, following MDN convention. Preferred: '@returns A promise that resolves to a CameraPhoto object.' Also acceptable: '@returns A promise fulfilled with a CameraPhoto object.' In inline prose, 'resolves with' is acceptable.

Expo API docs generation system

The docs generation system uses GenerateDocsAPIData.ts and TypeDoc to extract TSDoc comments from Expo SDK packages and produce API reference documentation. Document APIs as you write them, not as an afterthought, when implementing new features that expose public TypeScript APIs.

TSDoc type export patterns for docs generation

Types must be exported from the entry point file for docs generation to pick them up. Use direct re-export from types file: export { type FileName, type OtherType } from './Module.types'; Or import then re-export: import { TypeName } from './Module.types'; ... export { TypeName }; GenerateDocsAPIData processes the entry point and extracts all publicly exported symbols.

TSDoc constant documentation

Document constants with a single comment block describing what the constant represents. Example: '`true` if the app is running on a real device and `false` if running in a simulator or emulator.'

Documentation best practice: explain the iceberg

Document not just parameters and return values, but also failure modes, side effects, and concurrency behavior. Quality documentation over quantity—no docs is better than useless docs like 'The width' for a width property. Teach something useful about the API.

TSDoc blockquote notes and warnings format

Use '>' blockquotes for important callouts. Format: '> **Note:**' for informational notes or '> **warning**' for cautions (warning is lowercase). Multi-line notes use '>' on each line with blank '>' between paragraphs.

TSDoc code examples in docblocks

Wrap code examples in triple backticks with language tag (ts, tsx, js, json, swift, kotlin). Place @example tag before the code block. Example: @example followed by code block with triple backticks and ts language tag.

TSDoc function documentation structure

Function documentation should follow this structure: first sentence describes what the function does, additional sentences cover important behavior and edge cases, platform differences. Use periods when writing multiple sentences, but leave off trailing period for single-phrase descriptions. Include @return tag describing the return value, @example code block, and @platform tags if applicable.

TSDoc supported tags reference

@param: parameter description. @return/@returns: return value description. @default: default value (no Markdown, rendered as inline code). @platform: platform availability (android, ios, web, expo). @example: code example placed at bottom of description. @deprecated: deprecation notice auto-formatted as warning. @experimental: experimental API label. @hidden/@internal/@private: hide from generated docs. @header: group methods under custom headers. @needsAudit: mark for security/API audit (comment, not tag). @hideType: hide generated Type callout for constants.

TSDoc type and interface property documentation

Document each property in a type or interface individually with its own comment block. Provide useful descriptions that teach something beyond the property name. For example, describe 'The width of the captured photo, measured in pixels' instead of just 'The width'. Use @default tag for default values without Markdown formatting.

TSDoc @param documentation with blockquotes

Parameter documentation uses format '@param paramName Description starting with capital letter'. Parameters can include Markdown formatting (links, emphasis, lists) and blockquotes for important notes. Blockquotes use '>' syntax. Example: '@param intervalMs Desired interval in milliseconds' followed by '> **Note:** Starting from Android 12...'

TSDoc third-person declarative style for API docs

Write TSDoc comments using third-person declarative voice. Describe what a function does, not what to do. For example: use 'Gets the uptime', 'Returns the result', or 'Checks device root status' instead of imperative forms like 'Get the uptime' or 'Return the result'.

expo-font on iOS uses postscriptName for registration

On iOS, expo-font stores the font postscriptName instead of fullName which is what iOS uses to register the font.

expo-image-picker iOS EXIF metadata width/height with tags 5 and 7

Fixed incorrect width/height reported with EXIF tags 5 and 7 in expo-image-picker on iOS.

expo-camera active prop

An active prop has been added to expo-camera to stop and start the camera session.

expo-gl texImage2D GIF format removed for performance

GIF image format support has been removed from image decoding in the `texImage2D` expo wrapper as a performance optimization.

expo-file-system copy and move methods now asynchronous

The `copy()` and `move()` methods of `File` and `Directory` are now asynchronous and return a Promise. Use `copySync()` and `moveSync()` for synchronous behavior.

expo-blur experimentalBlurMethod renamed to blurMethod

On Android, the `experimentalBlurMethod` prop has been renamed to `blurMethod`.

expo-clipboard removeClipboardListener deprecated

The `removeClipboardListener` call has been marked as deprecated.

expo-auth-session extraHeaders option

expo-auth-session adds extraHeaders option to TokenRequest and RevokeTokenRequest.

expo-file-system File.write() now asynchronous

`File.write()` is now asynchronous and returns a Promise. Use `File.writeSync()` for synchronous behavior.

expo-file-system FileHandle read and write methods now asynchronous

`FileHandle.readBytes()` and `FileHandle.writeBytes()` are now asynchronous and return a Promise. Use `FileHandle.readBytesSync()` and `FileHandle.writeBytesSync()` for synchronous behavior.

iOS minimum version bumped to 16.4 across modules

Multiple Expo modules have bumped their minimum iOS/tvOS version to 16.4 and macOS to 13.4, including: unimodules-app-loader, expo-web-browser, expo-video-thumbnails, expo-task-manager, expo-store-review, expo-speech, expo-sqlite, expo-sms, expo-sharing, expo-secure-store, expo-sensors, expo-screen-capture, expo-screen-orientation, expo-print, expo-network, expo-notifications, expo-localization, expo-media-library, expo-mail-composer, expo-location, expo-keep-awake, expo-modules-core, expo-local-authentication, expo-linking, expo-image-manipulator, expo-haptics, expo-linear-gradient, expo-gl, expo-image-picker, expo-font, expo-document-picker, expo-file-system, expo-device, expo-crypto, expo-contacts, expo-constants, expo-clipboard, expo-cellular, expo-camera, expo-calendar, expo-brightness, expo-blur, expo-battery, expo-background-fetch, expo-application, expo-apple-authentication, and expo-asset.

expo-camera preview pause resume

Support for pausing and resuming the preview has been added to expo-camera.

expo-file-system download and upload task APIs

expo-file-system now supports `file.createUploadTask()` and `File.createDownloadTask()` APIs for handling file transfers with progress tracking.

expo-web-browser openAuthSessionAsync HTTPS redirect handling

Fixed `openAuthSessionAsync` silently failing on iOS 17.4+ when using `https://` redirect URLs without Associated Domains entitlements. The HTTPS universal link callback API is now opt-in via the `preferUniversalLinks` option.

expo-calendar object-oriented API features

The new object-oriented expo-calendar API includes: iOS-specific writeOnly permissions support, `calendar.addEventWithForm()` on both iOS and Android, `presentPicker()` on iOS.

expo-file-system download error when destination exists

Fixed download function in expo-file-system throwing an unexpected error if the destination already exists.

expo-contacts migrate to Expo Modules iOS

On iOS, expo-contacts was migrated to Expo Modules.

expo-file-system append option for write methods

expo-file-system adds append option to write methods.

expo-camera pictureSize prop added

Added pictureSize prop to CameraView component in expo-camera.

expo-camera shutterSound CameraPictureOptions

A shutterSound key has been added to CameraPictureOptions in expo-camera, allowing users to disable the camera shutter sound when invoking takePictureAsync.

expo-file-system Android contentUri property

expo-file-system on Android adds contentUri property.

expo-file-system iOS file sharing config options

expo-file-system on iOS adds file sharing config options.

expo-constants Constants.appOwnership deprecated

Deprecated Constants.appOwnership in expo-constants.

expo-sqlite enableCRSQLite option deprecated

Deprecated enableCRSQLite option in expo-sqlite and shows a warning if using this option.

expo-file-system base64 write options

expo-file-system adds write options for base64 encoded bytes.

expo-calendar system-provided calendar UI

New methods for managing events using the system-provided calendar UI have been added to expo-calendar.

expo-sqlite renamed async-storage to kv-store

Renamed expo-sqlite/async-storage to expo-sqlite/kv-store.

expo-media-library migrate to Expo Modules iOS

On iOS, expo-media-library was migrated to Expo Modules.

expo-av loadAsync promise settlement with invalid file uri

Fixed loadAsync promise never settling when given an invalid file URI in expo-av on iOS.

expo-media-library API migration from legacy to object-oriented

The object-oriented MediaLibrary API has been promoted to the root `expo-media-library` import. The legacy API has been moved to `expo-media-library/legacy`.

expo-contacts API migration from legacy to object-oriented

The object-oriented Contacts API has been promoted to the root `expo-contacts` import. The legacy API has been moved to `expo-contacts/legacy`.

expo-calendar API migration from legacy to object-oriented

The object-oriented Calendar API has been promoted to the root `expo-calendar` import. The legacy API has been moved to `expo-calendar/legacy`.

expo-file-system downloadFileAsync idempotent option

expo-file-system adds idempotent option to downloadFileAsync.

expo-camera new architecture sublayers crash on iOS

Fixed crash related to sublayers on iOS 0.75 and above on the new architecture in expo-camera.

expo-camera quality option when set to 0 in takePictureAsync

Fixed takePictureAsync quality option when set to 0 in expo-camera.

expo-clipboard setString function removed

The deprecated `setString` function has been removed from `expo-clipboard`. Use `setStringAsync` instead.

expo-camera ean13 barcode fix on iOS

Fixed ean13 barcodes not returning data on iOS in expo-camera.

expo-linear-gradient macOS support added

expo-linear-gradient now has macOS support.

expo-location motion activity APIs added

Added motion activity APIs to expo-location: `getMotionActivityAsync`, `watchMotionActivityAsync`, and permission helpers.

expo-file-system File.pickFileAsync multiple file support

File.pickFileAsync() now supports picking multiple files and choosing multiple MIME types, achieving feature parity with `expo-document-picker`.

expo-contacts ContactQuery id field accepts arrays

Fixed ContactQuery id field in expo-contacts to accept arrays on Android.

expo-file-system file watch events support

expo-file-system now supports watching file and directory events.

expo-web-browser auth universal links callback support

expo-web-browser now adds support for auth universal links callback.

expo-media-library object-oriented API features

The new object-oriented expo-media-library API includes: listeners support, `presentPermissionsPicker`, iOS-specific methods like `asset.getMediaSubtypes()`, `asset.getLivePhotoVideoUri()`, `asset.getIsInCloud()`, `asset.getOrientation()`, `asset.getAlbums()`, `Album.getAll()`, `album.removeAssets()`, `usePermissions` hook, `getPermissionsAsync`, support for adding/removing assets from Favorites smart album on both iOS and Android with `getFavorite()`/`setFavorite()` on Android.

expo-font web name property removed

The unused web name property was dropped from expo-font.

expo-camera barcode type support expanded

Web barcode scanning support has been expanded for additional barcode types.

Give your agent this brain