Download react-instantsearch/examples/multi-index/src/App.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 548 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/multi-index/src/App.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/multi-index/src/App.js
-
curl -L -o App.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/multi-index/src/App.js
548 Bytes
| import React from 'react'; | |
| import { InstantSearch, Hits, SearchBox, Index } from 'react-instantsearch-dom'; | |
| import algoliasearch from 'algoliasearch/lite'; | |
| const searchClient = algoliasearch( | |
| 'latency', | |
| '6be0576ff61c053d5f9a3225e2a90f76' | |
| ); | |
| const App = () => ( | |
| <InstantSearch searchClient={searchClient} indexName="airbnb"> | |
| <SearchBox /> | |
| <p>Results in first dataset</p> | |
| <Hits /> | |
| <Index indexName="instant_search"> | |
| <p>Results in second dataset</p> | |
| <Hits /> | |
| </Index> | |
| </InstantSearch> | |
| ); | |
| export default App; | |