Documentation
Latest
Latest
  • Reactify Search
  • Getting Started
  • Guides
    • Upgrade workflow
    • Upgrade v4 to v5
    • Liquid Theme
    • SSR
  • Release Notes
  • Troubleshooting
    • Categorising Issues
    • Common Issues
    • Debugger
    • CodeSandbox
    • Further Troubleshooting
  • Security Overview
  • Components
    • Component Basics
    • ReactifySearchProvider
    • Sensors
    • Search
    • SortBy
    • ClearAll
    • FiltersSelected
    • Filters
    • Filter
    • Results
    • Stats
    • Suggestions
    • CustomComponent
  • Hooks
    • useSearch
    • useSortBy
    • useFilters
    • useResults
  • Classes
    • ReactifySearchLiquidFactory
Powered by GitBook
On this page
  • Purpose
  • Usage
  • Props
  • Configure

Was this helpful?

  1. Components

Sensors

PreviousReactifySearchProviderNextSearch

Last updated 1 year ago

Was this helpful?

Purpose

The Sensors component contains all of the merchant-defined filtering options (that are not filters themselves) and operates differently when used within different search modes.

Usage

The Sensors component should be added directly within the .

For advanced implementations you can include your own custom sensors by using the , remember to include the componentId values to the additionalComponentHandles prop.

import React from "react";
import { Sensors } from "@usereactify/search";

export const Component: React.FC = () => {
  return (
    <Sensors />
  );
};
import React from "react";
import { ReactifySearchProvider, CustomComponent } from "@usereactify/search";

export const ExampleCustomComponent: React.FC = () => {
  return (
    <ReactifySearchProvider
      mode="search"
      shopifyPermanentDomain="reactify-apps.myshopify.com"
      additionalComponentIds={["SensorSpecialProduct"]}
    >
      <CustomComponent
        componentId="SensorSpecialProduct"
        customQuery={() => ({
          query: {
            match: {
              product_type: "Special Product",
            },
          },
        })}
      />
    </ReactifySearchProvider>
  );
}

Props

type SensorsProps = {
  /** This component does not support any props */
};

Configure

The Sensors component is configured throughout multiple areas of the Reactify Search app.

ReactifySearchProvider
CustomComponent
ReactifySearchProvider