Development using custom UI components
You can integrate a React application using Sitecore Search JS SDK without using Search headless UI components. The JS SDK provides various query hooks, components, and functions. Using them, the JS SDK manages your application's data interaction with Search.
The following are some typical scenarios when you want to query hook your React application using JS SDK for React:
-
You want to populate a functional web application with Search data.
-
You are restricted from using UI components in Search UI Components package.
Browse the starter kit website of a fully functioning search web application. You can download the application from its GitHub repository.
The following walkthrough describes how you can use the JS SDK to integrate an application using your components.
Before you begin integration, remember to:
-
Create an inventory of widgets and their respective UI in your application.
-
Make sure that the widgets are published.
To integrate a React application using the Search JS SDK and custom UI components:
-
Install the JS SDK for React in your project.
-
For each widget, connect its UI component to Search using a query hook
-
For each UI component, add code to track events not registered through the query hooks