Skip to content

Instantly share code, notes, and snippets.

@samouss
Last active March 27, 2018 11:18
Show Gist options
  • Save samouss/dc489ea3411483ca948c4917932b80c3 to your computer and use it in GitHub Desktop.
Save samouss/dc489ea3411483ca948c4917932b80c3 to your computer and use it in GitHub Desktop.
// With multiple package
import {
connectHits,
connectRefinementList
} from "react-instantsearch-connectors";
import {
InstantSearch,
Configure,
SearchBox
} from "react-instantsearch-native";
const CustomHits = connectHits(() => null);
const CustomRefinementList = connectRefinementList(() => null);
const App = () => (
<InstantSearch>
<Configure hitPerPage={8} />
<SearchBox />
<CustomHits />
<CustomRefinementList />
</InstantSearch>
);
// With one package
import {
InstantSearch,
Configure,
SearchBox,
connectHits,
connectRefinementList
} from "react-instantsearch-native";
const CustomHits = connectHits(() => null);
const CustomRefinementList = connectRefinementList(() => null);
const App = () => (
<InstantSearch>
<Configure hitPerPage={8} />
<SearchBox />
<CustomHits />
<CustomRefinementList />
</InstantSearch>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment