Simple Solr connector for React.js

We’ve just published a simple (60 lines of code) React.js component to npm which makes it easy to perform searches on a Solr 6 instance and get the data into the app to display. Unlike Twigkit or Searchkit this is not a UI library – it is just a connector. If you use it you will have to implement all the UI components yourself. The npm package name is react-solr-connector and the code is available on GitHub (Apache 2.0 licence).

react-solr-connector provides a React component to contain your app. This component injects a prop into the app which includes a callback for performing a search. When the search results are available, the prop is updated so that the app can re-render. For full details, see

This package currently provides the bare minimum functionality in order to be useable, and requires knowledge of the Solr API in order to implement a working search app. I intend to start adding helper functions to the package to make this easier.

react-solr-connector is not the right choice if you are using Redux or another state management library. I may implement a Redux reducer for Solr at some point (although it appears that there is at least one other person working on this).

New:  A simple facetted search app with highlighting which uses the React Solr connector.

Share this postShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

2 thoughts on “Simple Solr connector for React.js

  1. Can you please provide some details about how to run your example? Since it always says there is a bundle.js file not found.

    • bundle.js should be created dynamically by the webpack dev server when you execute npm start, as described in Could you please copy and post the output when you run this command?

Leave a Reply

Your email address will not be published. Required fields are marked *