Skip to main content

Introduction

React Valu Search, later RVS, is a npm package that can used to implement the Valu Search User Interface with minimal effort. It is implemented as React.js components but it can be used as a standalone package too without directly using React.js.

API Keys

The package requires client specific API keys which will be provided by the Valu Search team.

Installation

Install the package and

npm install @valu/react-valu-search

and React packages since it is a peer dependency of RVS.

npm install react react-dom
RSV is written using TypeScript so it comes with 100% type support but

it will also work with plain JavaScript too. For the best developer experience TypeScript is highly recommended though. :::

Bundler requirements

RVS is provided as npm package that can be bundled for browsers. There's no UMD-like builds that can be directly added as a script tag. This means you need a bundler such as Webpack, Parcel or Rollup or a framework such as Next.js, Gatsy.js, create-react-app etc. that comes with one.

Browser requirements

RVS expects a fairly modern browser enviroment but the code is compiled down to be Internet Explorer 11 compatible, so only runtime polyfilling is required. When using the lazy load helpers LazyValuSearch or LazyReactValuSearch the polyfills are automatically loaded from our CDN when needed. Otherwise you need to provide them manually.

For manual polyfilling you can import the polyfill yourself:

import "@valu/react-valu-search/polyfill";

Or link it from our CDN:

https://cdn.search.valu.pro/react-valu-search/v15.0.4/polyfill.js

:::