React InstantSearch Core is a headless UI library for React applications, enabling developers to build highly customized, lightning-fast search interfaces powered by Algolia. It provides a set of renderless components and hooks that manage the search logic and state, abstracting away the complexities of interacting directly with the Algolia API. Unlike `react-instantsearch`, which offers pre-built DOM components, `react-instantsearch-core` focuses on providing low-level primitives suitable for both web and React Native projects, allowing maximum flexibility in UI implementation. The library is currently stable at version 7.29.0 and is actively maintained within the Algolia InstantSearch ecosystem, receiving frequent updates, typically monthly, to align with new features and improvements across the InstantSearch family of libraries. Its core differentiator lies in its headless nature, empowering developers to create unique search experiences without being constrained by opinionated UI components.
npm install react-instantsearch-coreVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up InstantSearch with a custom search box and hits display using `useInstantSearch` hooks.
If expecting visual components, install `react-instantsearch` instead. If building custom UI, ensure you implement rendering logic for your components.
Upgrade your project's `react` and `react-dom` dependencies to version `^16.8.0` or newer. The current peer dependency range is `>= 16.8.0 < 20`.
Ensure your installed `algoliasearch` client version is compatible with the `react-instantsearch-core` peer dependency range. Upgrade or downgrade `algoliasearch` as needed.
Always provide a properly initialized `searchClient` from `algoliasearch` and the `indexName` of your Algolia index to the `InstantSearch` component. Ensure your API keys are correct and have appropriate permissions.
Install `algoliasearch`: `npm install algoliasearch` or `yarn add algoliasearch`.
Ensure you are passing a valid `algoliasearch` client instance, like `algoliasearch('APP_ID', 'API_KEY')`, to the `searchClient` prop of the `InstantSearch` component.Ensure all calls to `useInstantSearch` (or other React Hooks) are made within the top level of a functional component or a custom Hook.