react-instantsearch-hooks
Advanced tools
Comparing version 6.24.3 to 6.25.0
@@ -15,5 +15,5 @@ "use strict"; | ||
function useInstantSearchContext() { | ||
var context = (0, _react.useContext)(_InstantSearchContext.InstantSearchContext); | ||
(0, _invariant.invariant)(context !== null, 'Hooks must be used inside the <InstantSearch> component.\n\n' + 'They are not compatible with the `react-instantsearch-core` and `react-instantsearch-dom` packages, so make sure to use the <InstantSearch> component from `react-instantsearch-hooks`.'); | ||
return context; | ||
var search = (0, _react.useContext)(_InstantSearchContext.InstantSearchContext); | ||
(0, _invariant.invariant)(search !== null, 'Hooks must be used inside the <InstantSearch> component.\n\n' + 'They are not compatible with the `react-instantsearch-core` and `react-instantsearch-dom` packages, so make sure to use the <InstantSearch> component from `react-instantsearch-hooks`.'); | ||
return search; | ||
} |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = void 0; | ||
var _default = '6.24.3'; | ||
var _default = '6.25.0'; | ||
exports.default = _default; |
import React from 'react'; | ||
import type { UseInstantSearchProps } from '../lib/useInstantSearch'; | ||
export declare type InstantSearchProps = UseInstantSearchProps & { | ||
import type { UiState } from 'instantsearch.js'; | ||
export declare type InstantSearchProps<TUiState extends UiState = UiState, TRouteState = TUiState> = UseInstantSearchProps<TUiState, TRouteState> & { | ||
children?: React.ReactNode; | ||
}; | ||
export declare function InstantSearch({ children, ...props }: InstantSearchProps): JSX.Element | null; | ||
export declare function InstantSearch<TUiState extends UiState = UiState, TRouteState = TUiState>({ children, ...props }: InstantSearchProps<TUiState, TRouteState>): JSX.Element | null; |
import InstantSearch from 'instantsearch.js/es/lib/InstantSearch'; | ||
import type { InstantSearchOptions } from 'instantsearch.js'; | ||
export declare type UseInstantSearchProps = InstantSearchOptions; | ||
export declare function useInstantSearch(props: UseInstantSearchProps): InstantSearch<import("instantsearch.js").UiState, import("instantsearch.js").UiState>; | ||
import type { InstantSearchOptions, UiState } from 'instantsearch.js'; | ||
export declare type UseInstantSearchProps<TUiState extends UiState, TRouteState> = InstantSearchOptions<TUiState, TRouteState>; | ||
export declare function useInstantSearch<TUiState extends UiState, TRouteState>(props: UseInstantSearchProps<TUiState, TRouteState>): InstantSearch<TUiState, TRouteState>; |
@@ -1,1 +0,2 @@ | ||
export declare function useInstantSearchContext(): import("instantsearch.js/es/lib/InstantSearch").default<import("instantsearch.js").UiState, import("instantsearch.js").UiState>; | ||
import type { InstantSearch, UiState } from 'instantsearch.js'; | ||
export declare function useInstantSearchContext<TUiState extends UiState, TRouteState = TUiState>(): InstantSearch<TUiState, TRouteState>; |
@@ -5,5 +5,5 @@ import { useContext } from 'react'; | ||
export function useInstantSearchContext() { | ||
var context = useContext(InstantSearchContext); | ||
invariant(context !== null, 'Hooks must be used inside the <InstantSearch> component.\n\n' + 'They are not compatible with the `react-instantsearch-core` and `react-instantsearch-dom` packages, so make sure to use the <InstantSearch> component from `react-instantsearch-hooks`.'); | ||
return context; | ||
var search = useContext(InstantSearchContext); | ||
invariant(search !== null, 'Hooks must be used inside the <InstantSearch> component.\n\n' + 'They are not compatible with the `react-instantsearch-core` and `react-instantsearch-dom` packages, so make sure to use the <InstantSearch> component from `react-instantsearch-hooks`.'); | ||
return search; | ||
} |
@@ -1,2 +0,2 @@ | ||
declare const _default: "6.24.3"; | ||
declare const _default: "6.25.0"; | ||
export default _default; |
@@ -1,1 +0,1 @@ | ||
export default '6.24.3'; | ||
export default '6.25.0'; |
{ | ||
"name": "react-instantsearch-hooks", | ||
"version": "6.24.3", | ||
"version": "6.25.0", | ||
"description": "⚡ Lightning-fast search for React, by Algolia", | ||
@@ -5,0 +5,0 @@ "source": "src/index.ts", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2599068
14493