How to use react-instantsearch-core - 10 common examples

To help you get started, we’ve selected a few react-instantsearch-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github algolia / react-instantsearch / packages / react-instantsearch-dom / src / widgets / CurrentRefinements.js View on Github external
*     
 *     
 *   
 * );
 */

const CurrentRefinementsWidget = props => (
  
    
  
);

export default connectCurrentRefinements(CurrentRefinementsWidget);
github algolia / react-instantsearch / packages / react-instantsearch-dom / src / widgets / ClearRefinements.js View on Github external
*     
 *     
 *   
 * );
 */

const ClearRefinementsWidget = props => (
  
    
  
);

export default connectCurrentRefinements(ClearRefinementsWidget);
github algolia / react-instantsearch / packages / react-instantsearch-dom / src / widgets / Highlight.js View on Github external
*   'latency',
 *   '6be0576ff61c053d5f9a3225e2a90f76'
 * );
 *
 * const App = () => (
 *   
 *     
 *     
 *   
 * );
 */

export default connectHighlight(Highlight);
github algolia / react-instantsearch / packages / react-instantsearch-dom / src / widgets / Snippet.js View on Github external
*     
 *   
 * );
 *
 * const App = () => (
 *   
 *     
 *     
 *   
 * );
 */

export default connectHighlight(Snippet);
github algolia / react-instantsearch / stories / InfiniteHits.stories.js View on Github external
.add('with Insights', () => {
    const insightsClient = (method, payload) =>
      action(`[InsightsClient] sent ${method} with payload`)(payload);
    const ProductWithInsights = connectHitInsights(insightsClient)(Product);

    function Product({ hit, insights }) {
      return (
        <div>
          
          <button>
              insights('clickedObjectIDsAfterSearch', {
                eventName: 'Add to cart',
              })
            }
          &gt;
            Add to cart
          </button>
        </div>
      );
github algolia / react-instantsearch / stories / Hits.stories.js View on Github external
.add('with Insights', () =&gt; {
    const insightsClient = (method, payload) =&gt;
      action(`[InsightsClient] sent ${method} with payload`)(payload);
    const ProductWithInsights = connectHitInsights(insightsClient)(Product);
    function Product({ hit, insights }) {
      return (
        <div>
          
          <button>
              insights('clickedObjectIDsAfterSearch', {
                eventName: 'Add to cart',
              })
            }
          &gt;
            Add to cart
          </button>
        </div>
      );
    }
github algolia / react-instantsearch / stories / QueryRuleContext.stories.tsx View on Github external
link: string;
};

type MovieHit = {
  actors: string[];
  color: string;
  genre: string[];
  image: string;
  objectID: string;
  score: number;
  title: string;
};

const stories = storiesOf('QueryRuleContext', module);

const StoryHits = connectHits(({ hits }: { hits: MovieHit[] }) =&gt; (
  <div>
    {hits.map(hit =&gt; (
      <div>
        <div>
          <img src="{hit.image}">
        </div>

        <div>
          <div>
            
          </div>
        </div>
      </div>
    ))}
  </div>
));
github algolia / react-instantsearch / packages / react-instantsearch-dom / src / widgets / Hits.js View on Github external
*
 * const searchClient = algoliasearch(
 *   'latency',
 *   '6be0576ff61c053d5f9a3225e2a90f76'
 * );
 * const App = () =&gt; (
 *   
 *     
 *   
 * );
 */

export default connectHits(Hits);
github algolia / react-instantsearch / packages / react-instantsearch-dom / src / widgets / Menu.js View on Github external
*   
 *     <menu>
 *   
 * );
 */

const MenuWidget = props =&gt; (
  
    <menu>
  
);

export default connectMenu(MenuWidget);
</menu></menu>
github algolia / react-instantsearch / packages / react-instantsearch-dom / src / widgets / MenuSelect.js View on Github external
*   
 *     
 *   
 * );
 */

const MenuSelectWidget = props =&gt; (
  
    
  
);

export default connectMenu(MenuSelectWidget);