fiber-element
FiberElement Lynx Apps
Use this skill to build Lynx apps directly from Element PAPI calls exposed through @lynx-js/type-element-api. Treat Element PAPI as the rendering layer: main thread renders, background thread handles async work and events.
Core Rules
- Do not use ReactLynx, JSX, virtual DOM, or browser DOM APIs unless the user explicitly asks for them.
- Split app code into
src/main-thread.ts,src/background.ts, andsrc/style.css. - Use
@lynx-js/type-element-apifor globals/types; Element PAPI functions are runtime globals and are not imported as values. - Keep async work, timers, native data updates, storage, and event handling in
src/background.ts. - Keep Element PAPI tree creation and mutation in
src/main-thread.ts. - If first-screen data exists, keep that data in the main-thread environment first and synchronize it to background through
processData.
Reading Order
- For project scaffold and template-webpack build setup, read
references/template-webpack-build.md. - For shared main-thread helpers, lifecycle shape, Element PAPI selection, and restrictions, read
references/main-thread-rendering.md. - For first-screen data, background updates, and double-thread communication, read
references/double-thread-data-sync.md.
More from lynx-community/skills
lynx-devtool
Interact with Lynx DevTool to inspect and debug Lynx applications. Use this skill to list connected clients and sessions, send Chrome DevTools Protocol (CDP) commands, send App commands, and open URLs in Lynx. This is useful for debugging UI issues, inspecting runtime state, or automating interactions with Lynx apps.
851reactlynx-best-practices
ReactLynx best practices covering dual-thread architecture and React patterns. Provides rules reference for writing, static analysis for reviewing, and auto-fix for refactoring.
70lynx-typescript
|
67lynx-trace-analysis
|
55debug-info-remapping
Remap the function_id:pc_index to the original source code position by provided debug info json file.
54lynx-trace-record
This guide provides step-by-step instructions for recording Lynx performance traces. Use this guide when the user asks how to record a trace.
53