Keep your Anvil app in sync with its state

Anvil Reactive updates your app when its Python state changes. You describe the relationship between a value and the parts of your app that use it; Reactive then keeps those parts up to date.

This is useful when several components use the same state, or when you would otherwise need to call refresh methods from several event handlers.

Start here

  1. Install Anvil Reactive as a third-party dependency.
  2. Build a reactive counter to update a Label from a value.
  3. Read How automatic updates work before building more complex state.

What do you want to do?

Reactive updates happen in client code. If an effect calls the server or waits for other work, read Server calls inside effects before relying on its update order.

The API reference lists the complete public interface.

Based on Solid Signals

Anvil Reactive follows a specific version of Solid Signals. When the project adopts a different Solid Signals version, Anvil Reactive's own version is bumped as well. Pin a tagged Anvil Reactive version so your app continues to use the same behavior.