⌘K

Develop with Hot Reload

Use --watch to push frame changes to your device instantly while you work.

The --watch flag keeps the CLI running and re-deploys your frame every time you save the file. Combined with DevKit in your app, changes appear on your device without a rebuild. That is hot reload.


Prerequisites

  • DevKit set up in your app. See Hot Reload for setup.
  • Your device or emulator running the app in debug mode with DevKit connected.

Start watching

nativeblocks frame deploy -f ./frames/home.ts --watch

The CLI deploys the frame once immediately, then watches for file changes. On every save it re-deploys and sends a signal to DevKit, which refreshes the frame on your device.


Typical development loop

  1. Run frame deploy --watch in one terminal
  2. Open the frame file in your editor
  3. Make a change and save
  4. The frame updates on your device in seconds

No app rebuild. No app restart.


Stream device logs

Add --log to stream logs from connected SDK devices while you watch. It requires --watch.

nativeblocks frame deploy -f ./frames/home.ts --watch --log

This is useful for catching action failures and variable issues without leaving the terminal.


Notes

  • --watch and --tag cannot be combined. Tags are for production releases, not live development sessions.
  • If the CLI loses the connection to DevKit, restart the watch command.
  • Multiple frame files need separate --watch processes, one per file.

What's next