Ninja Pumpkin Mutants

    @nubo-ui/search
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.4 • Public • Published

    Nubo UI - Search

    npm i @nubo-ui/search react-instantsearch-dom @meilisearch/instant-meilisearch
    

    Usage

    import { getSearchClient } from '@nubo-ui/search';
    import { Hits, InstantSearch, SearchBox } from 'react-instantsearch-dom';
    
    const searchClient = getSearchClient({
      apiKey: 'apik-...',
    });
    
    const App = () => (
      <InstantSearch searchClient={searchClient} indexName="users">
        <SearchBox />
        <Hits />
      </InstantSearch>
    );

    Authentication

    Authentication to your data is done with an API key. You have two options.

    Option 1

    Set the API key directly in the client.

    getSearchClient({
      apiKey: 'apik-xxxxx',
    });

    Option 2

    Set the API key with an environment variable. Choose one of the following, depending on your environment.

    NUBO_API_KEY=apik-xxxxx
    REACT_APP_NUBO_API_KEY=apik-xxxxx
    NEXT_PUBLIC_NUBO_API_KEY=apik-xxxxx
    

    Make sure to use an API key with limited permissions, as this will be available in the browser.

    Keywords

    none

    Install

    npm i @nubo-ui/search

    DownloadsWeekly Downloads

    1

    Version

    0.0.4

    License

    MIT

    Unpacked Size

    3.21 kB

    Total Files

    7

    Last publish

    Collaborators

    • nubodev