Socket
Socket
Sign inDemoInstall

react-elasticsearch

Package Overview
Dependencies
6
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-elasticsearch

[![Version](https://img.shields.io/npm/v/react-elasticsearch.svg)](https://npmjs.org/package/react-elasticsearch) [![Downloads](https://img.shields.io/npm/dt/react-elasticsearch.svg)](https://npmjs.org/package/react-elasticsearch) [![License](https://img.


Version published
Weekly downloads
1.4K
increased by49.08%
Maintainers
2
Install size
214 kB
Created
Weekly downloads
 

Readme

Source

React Elasticsearch

Version Downloads License

UI components for React + Elasticsearch. Create search applications using declarative components.

Usage

👉 Documentation and playable demo available here.

const MySearchComponent = () => (
  <Elasticsearch url="http://example.org/search">
    <SearchBox id="mainSearch" />
    <Facet id="actors" fields={["actors"]} />
    <Facet id="releasedYear" fields={["releasedYear"]} />
    <Results
      id="results"
      items={data =>
        // Map on result hits and display whatever you want.
        data.map(item => <MyCardItem key={item._id} source={item._source} />)
      }
    />
  </Elasticsearch>
);

Install

npm i react-elasticsearch
yarn add react-elasticsearch

Develop

You can test components with storybook (20+ examples).

npm run storybook

Main features

  • 🏝 Released under MIT licence.
  • 👩‍🎨 Each component is built with React and is customisable. Not too much extra features nor magic.
  • 💅 It comes with no style so it's the developers responsibility to implement their own.
  • 🐿 35.32KB gzipped for the whole lib, compatible with old browsers: >0.03% usage.
  • 🔮 No legacy: created in 2019, updated in 2021 with hooks.

Why?

We started building the search experience of the french Cultural Heritage Open Platform with ReactiveSearch, a well-known search UI components lib for React. After some weeks, we realized we had spent a lot of time tweaking and hacking the lib; we had rewrote almost every components ourselves. We opened issues and pull requests on the repository, but it seemed the lib was a bit stuck in a rewrite process. We found out that we need a simple lib that can be easily extended with a similar API, we created this one. This lib has many less feature than others, it's not even a decent competitor. But since it helped us building a search experiences, it has been released. Hope it could help you!

Contributing

Open issues and PR here: https://github.com/betagouv/react-elasticsearch

FAQs

Last updated on 19 May 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc