Functions

Explore the utility functions available in the Next.Js SDK.

The JavaScript SDK provides a convenient set of utility functions for interacting with our client-facing APIs.

These functions can be used in any JavaScript environment, including Node.js, meaning that they can also be used in server-side rendered applications.

Croct's mascot winking
Looking for something specific?

Use the search bar at the top of the page or press / to quickly search through the documentation.

Use the summary below to quickly jump to a specific topic:

PageDescription
middlewareHandle the communication between the client and the server.
withCroctWrap a Next.js API route handler with the Croct middleware.
evaluateEvaluate a CQL query in real-time.
cqlEvaluate a CQL query in real-time using a tag function.
fetchContentFetch content from a slot.
identifyAssociate the current session with an identified user.
anonymizeDissociate the current session from the identified user.