index
Last updated
Was this helpful?
Last updated
Was this helpful?
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports superglue
Re-exports pages
const
GRAFTING_ERROR:"@@superglue/GRAFTING_ERROR"
='@@superglue/GRAFTING_ERROR'
Defined in
const
GRAFTING_SUCCESS:"@@superglue/GRAFTING_SUCCESS"
='@@superglue/GRAFTING_SUCCESS'
Defined in
const
rootReducer: {superglue
:superglueReducer
;pages
:pageReducer
; }
Type declaration
superglue
superglueReducer
pages
pageReducer
Defined in
Save and process a rendered view from PropsTemplate. This is the primitive function that visit
and remote
calls when it receives a page.
If you render a page outside the normal request response cycle, e.g, websocket, you can use this function to save the payload.
Parameters
pageKey
string
page
Returns
Defined in
Calling this redux#ActionCreator with Args
will return an Action with a payload of type P
and (depending on the PrepareAction
method used) a meta
- and error
property of types M
and E
respectively.
Parameters
...args
Returns
{}
Defined in
A redux action called whenever a fragment is received from visit
or updated using remote
. Its a useful action to use for cross cutting concerns like a shared header or a shopping cart. For example:
Parameters
payload
object
payload.name
string
payload.path
string
payload.pageKey
string
payload.value
payload.previousValue
?
Returns
{}
Defined in
copyPage(
payload
: {from
:string
;to
:string
; }): {}
A redux action you can dispatch to copy a page from one pageKey to another. Its a very useful way to create optimistic updates with a URL change. For example:
Parameters
payload
object
payload.from
string
payload.to
string
Returns
{}
Defined in
removePage(
payload
: {pageKey
:string
; }): {}
A redux action you can dispatch to remove a page from your store.
Parameters
payload
object
payload.pageKey
string
Returns
{}
Defined in
A redux action called before a fetch
takes place. It will fire in remote
and visit
. You can hook into this event in your redux slices like this:
Parameters
payload
object
payload.fetchArgs
Returns
{}
Defined in
A redux action called before a visit
takes place. You can hook into this event in your redux slices like this:
Parameters
payload
object
payload.currentPageKey
string
payload.fetchArgs
Returns
{}
Defined in
A redux action called before remote
takes place. You can hook into this event in your redux slices like this:
Parameters
payload
object
payload.currentPageKey
string
payload.fetchArgs
Returns
{}
Defined in
Parameters
store
initialPage
path
string
Returns
void
Defined in
This is the setup function that the Application calls. Use this function if you like to build your own Application component.
Parameters
__namedParameters
Returns
visit
-
remote
-
nextHistory
History
-
initialPageKey
string
-
ujs
handlers
Defined in
The entry point to your superglue application. It sets up the redux Provider, redux state and the Navigation component.
This is a simple component, you can override this by copying the source code and use the exported methods used by this component (start
and ujsHandler
).
Parameters
__namedParameters
Returns
Element
Defined in
Parameters
node
path
string
Returns
Defined in
Converts a url to a PageKey.
Parameters
url
string
Returns
Defined in
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
Re-exports
(state
: , action
: Action
) =>
(state
: , action
: Action
) =>
saveAndProcessPage(pageKey
: string
, page
: | ):
|
saveResponse(...args
: [{pageKey
: string
;page
: ; }]): {}
[{pageKey
: string
;page
: ; }]
updateFragments(payload
: {name
: string
;path
: string
;pageKey
: string
;value
: ;previousValue
: ; }): {}
beforeFetch(payload
: {fetchArgs
: ; }): {}
beforeVisit(payload
: {currentPageKey
: string
;fetchArgs
: ; }): {}
beforeRemote(payload
: {currentPageKey
: string
;fetchArgs
: ; }): {}
prepareStore(store
: , initialPage
: , path
: string
): void
setup(__namedParameters
: ): {visit
: ;remote
: ;nextHistory
: History
;initialPageKey
: string
;ujs
: handlers
; }
{visit
: ;remote
: ;nextHistory
: History
;initialPageKey
: string
;ujs
: handlers
; }
Application(__namedParameters
: ): Element
getIn(node
: , path
: string
):
Retrieves data from a JSON object using a
urlToPageKey(url
: string
):