remote
is used with urls that contain the props_at
param for partial page updates.application.js
, your page components would all receive a visit
and remote
function that will dispatch when called.application_visit.js
visit
thunk is bare, it doesn't navigate on success or specify any behavior on error. We have to enhance it with sane defaults for the web then inject it into your application to override the thunk.application_visit.js
and the resulting visit
is injected in application.js
.visit
or remote
in application_visit.js
.visit
visit
thunk somewhere in your component:visit
are also passed to fetch
. Additionally, there are two features that enable low effort interactivity.beforeSave
remote
remote
combined with the props_at
parameter can update any part of the Redux store in the background. Most of the time, you would be using this thunk to update the current page the user is seeing. Like visit
, you can provide a beforeSave
callback to modify content before it gets saved to the store.pageKey
param to tell Superglue where to store the results. If you're using the thunk through a connected component, this will be set to the key of the current page for you.auto
remote("/dashboard?props_at=data.metrics")
call and 10 seconds later, {total_visitors: 30}
will be immutably grafted into the same position on the Redux store and React will rerender. For more control, you may provide a success_action
or fail_action
, and Superglue will dispatch these actions when the promise resolves successfully or fails.manual
manual
with deferment means that a remote
call will not take place, it is up to you to fetch the node using remote
yourself.