Skip to content
This repository was archived by the owner on Dec 30, 2022. It is now read-only.

Commit 5732e3d

Browse files
Haroenvdhayabsarahdayan
authored
feat(hooks): expose DOM components (#3450)
* chore(packages): make -web ready for release * Update packages/react-instantsearch-hooks-web/README.md Co-authored-by: Dhaya <[email protected]> * Update packages/react-instantsearch-hooks-web/README.md * readme based on the original * Update README.md * Update README.md * Update packages/react-instantsearch-hooks-web/README.md Co-authored-by: Dhaya <[email protected]> * Update packages/react-instantsearch-hooks-web/README.md Co-authored-by: Dhaya <[email protected]> * Apply suggestions from code review Co-authored-by: Sarah Dayan <[email protected]> Co-authored-by: Dhaya <[email protected]> Co-authored-by: Sarah Dayan <[email protected]>
1 parent 84c99fe commit 5732e3d

File tree

3 files changed

+90
-11
lines changed

3 files changed

+90
-11
lines changed
Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,88 @@
11
# react-instantsearch-hooks-web
22

3-
> 🚧 This version is not yet production-ready.
3+
React InstantSearch Hooks Web is an open-source React library that lets you create an instant search result experience using [Algolia][algolia-website]’s search API. It is part of the InstantSearch family:
4+
5+
**React InstantSearch** | [InstantSearch.js][instantsearch.js-github] | [Angular InstantSearch][instantsearch-angular-github] | [Vue InstantSearch][instantsearch-vue-github] | [InstantSearch Android][instantsearch-android-github] | [InstantSearch iOS][instantsearch-ios-github]
6+
7+
## Why
8+
9+
You should be using React InstantSearch Hooks Web if you want to:
10+
11+
* Design search experiences with best practices
12+
* Customize your components at will
13+
* Follow React principles
14+
15+
## Installation
16+
17+
React InstantSearch is available on the npm registry. It relies on [`algoliasearch`](https://github.com/algolia/algoliasearch-client-javascript) to communicate with Algolia APIs.
18+
19+
```sh
20+
yarn add algoliasearch react-instantsearch-hooks-web
21+
# or
22+
npm install algoliasearch react-instantsearch-hooks-web
23+
```
24+
25+
## Getting started
26+
27+
Using React InstantSearch Hooks Web is as simple as adding these components to your app:
28+
29+
```javascript
30+
import React from 'react';
31+
import ReactDOM from 'react-dom';
32+
import algoliasearch from 'algoliasearch/lite';
33+
import { InstantSearch, SearchBox, Hits } from 'react-instantsearch-hooks-web';
34+
35+
const searchClient = algoliasearch(
36+
'latency',
37+
'6be0576ff61c053d5f9a3225e2a90f76'
38+
);
39+
40+
const App = () => (
41+
<InstantSearch
42+
indexName="bestbuy"
43+
searchClient={searchClient}
44+
>
45+
<SearchBox />
46+
<Hits />
47+
</InstantSearch>
48+
);
49+
```
50+
51+
<p align="center">
52+
<a href="https://codesandbox.io/s/github/algolia/react-instantsearch/tree/master/examples/hooks" title="Edit on CodeSandbox">
53+
<img alt="Edit on CodeSandbox" src="https://codesandbox.io/static/img/play-codesandbox.svg">
54+
</a>
55+
</p>
56+
57+
To learn more about the library, follow the [getting started guide][doc-getting-started].
58+
59+
## Documentation
60+
61+
The documentation is available on [algolia.com/doc][doc].
62+
63+
## Playground
64+
65+
You can get to know React InstantSearch on [this playground][doc-playground].
66+
67+
Start by [adding components][doc-getting-started] and tweaking the display. Once you get more familiar with the library, you can learn more advanced concepts in [our guides][doc-guides].
68+
69+
## Contributing
70+
71+
We welcome all contributors, from casual to regular. You are only one command away to start the developer environment, [read our CONTRIBUTING guide](https://github.com/algolia/react-instantsearch/blob/master/CONTRIBUTING.md).
72+
73+
## License
74+
75+
React InstantSearch Hooks is [MIT licensed](../../LICENSE).
76+
77+
<!-- Links -->
78+
79+
[doc]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react-hooks/
80+
[doc-getting-started]: https://www.algolia.com/doc/guides/building-search-ui/getting-started/react-hooks/
81+
[doc-guides]: https://www.algolia.com/doc/guides/building-search-ui/going-further/server-side-rendering/react-hooks/
82+
[doc-playground]: https://codesandbox.io/s/github/algolia/react-instantsearch/tree/master/examples/hooks
83+
[algolia-website]: https://www.algolia.com/
84+
[instantsearch.js-github]: https://github.com/algolia/instantsearch.js
85+
[instantsearch-android-github]: https://github.com/algolia/instantsearch-android
86+
[instantsearch-ios-github]: https://github.com/algolia/instantsearch-ios
87+
[instantsearch-vue-github]: https://github.com/algolia/vue-instantsearch
88+
[instantsearch-angular-github]: https://github.com/algolia/angular-instantsearch

packages/react-instantsearch-hooks/README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# react-instantsearch-hooks
22

3-
> 🚧 This version is not yet production-ready.
4-
5-
React InstantSearch Hooks is an open-source, **experimental UI library** for React that lets you quickly build a search interface in your front-end application.
3+
React InstantSearch Hooks is an open-source UI library for React that lets you quickly build a search interface in your front-end application.
64

75
InstantSearch’s goal is to help you implement awesome search experiences as smoothly as possible by providing a [complete search ecosystem](https://algolia.com/doc/guides/getting-started/how-algolia-works/#the-full-ecosystem). InstantSearch tackles an important part of this vast goal by providing front-end primitives that you can assemble into unique search interfaces.
86

@@ -17,9 +15,9 @@ InstantSearch’s goal is to help you implement awesome search experiences as sm
1715
React InstantSearch Hooks is available on the npm registry. It relies on [`algoliasearch`](https://github.com/algolia/algoliasearch-client-javascript) to communicate with Algolia APIs.
1816

1917
```sh
20-
yarn add react-instantsearch-hooks algoliasearch
18+
yarn add algoliasearch react-instantsearch-hooks
2119
# or
22-
npm install react-instantsearch-hooks algoliasearch
20+
npm install algoliasearch react-instantsearch-hooks
2321
```
2422

2523
## Getting started
@@ -36,10 +34,6 @@ Check out the [**API reference**](https://www.algolia.com/doc/api-reference/widg
3634

3735
The documentation is available on [algolia.com/doc](https://algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react-hooks/).
3836

39-
## Troubleshooting
40-
41-
React InstantSearch Hooks is an experimental library, and might contain bugs. If you're experiencing issues, please refer to the [**Need help?**](https://algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react-hooks/#need-help) section of the docs, or [open a new issue](https://github.com/algolia/react-instantsearch/issues/new?template=Bug_report_Hooks.md&labels=Scope%3A%20Hooks).
42-
4337
## Contributing
4438

4539
We welcome all contributors, from casual to regular. You are only one command away to start the developer environment, [read our CONTRIBUTING guide](https://github.com/algolia/react-instantsearch/blob/master/CONTRIBUTING.md).

ship.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
'packages/react-instantsearch-dom-maps',
1212
'packages/react-instantsearch-dom',
1313
'packages/react-instantsearch-hooks',
14-
// 'packages/react-instantsearch-hooks-web',
14+
'packages/react-instantsearch-hooks-web',
1515
'packages/react-instantsearch-hooks-server',
1616
'packages/react-instantsearch-native',
1717
'packages/react-instantsearch',

0 commit comments

Comments
 (0)