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

fix(types): allow useInstantSearch to be generic #3508

Merged
merged 3 commits into from
Jun 9, 2022
Merged

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Jun 8, 2022

Summary

useInstantSearch should be generic, so you can use it with custom widgets in a type-safe way

Result

useInstantSearch<CustomUiState>() should work as expected, and have all functions have the right type for UiState

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 8, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 8c65f01:

Sandbox Source
algolia/create-instantsearch-app Configuration
routing-basic Configuration
hooks-example Configuration

@netlify
Copy link

netlify bot commented Jun 8, 2022

Deploy Preview for react-instantsearch ready!

Name Link
🔨 Latest commit 8c65f01
🔍 Latest deploy log https://app.netlify.com/sites/react-instantsearch/deploys/62a1a381796e79000af111c8
😎 Deploy Preview https://deploy-preview-3508--react-instantsearch.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Haroenv Haroenv marked this pull request as ready for review June 8, 2022 14:47
@Haroenv Haroenv requested review from a team, FabienMotte and sarahdayan and removed request for a team June 8, 2022 14:47
@Haroenv Haroenv merged commit 6807232 into master Jun 9, 2022
@Haroenv Haroenv deleted the fix/types-generic branch June 9, 2022 07:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants