---
title: "High order functions"
slug: "high-order-functions"
abstract: "List of high order functions in Sitecore Discover JS SDK for React."
---
# High order functions

To make integration easy for developers, Sitecore Discover includes ready-to-use high order functions in the JS SDK for React.

Use the following high order components:

- `widget` - to [configure UI components](https://doc.sitecore.com/discover/en/developers/discover-js-sdk-for-react/js-sdk-reference/high-order-functions/widget-function.html "widget function") into a widget component.
- `setWidget` - to [create a widget component](https://doc.sitecore.com/discover/en/developers/discover-js-sdk-for-react/js-sdk-reference/high-order-functions/setwidget-function.html "setWidget function") to match its CEC configuration.
- `setWidgetType` - to create a [generic widget component](https://doc.sitecore.com/discover/en/developers/discover-js-sdk-for-react/js-sdk-reference/high-order-functions/setwidgettype-function.html "setWidgetType function") of a particular type.
- `withPageWidget` - to render [widgets based on host page URL](https://doc.sitecore.com/discover/en/developers/discover-js-sdk-for-react/js-sdk-reference/high-order-functions/withpagewidgets-function.html "withPageWidgets function").