Fix basic example

Get the basic example in working condition by implementing minimal functionality
to replace running component.

Achieved by re-using tick-state! function to process a before-after refresh.

Fixes #2