Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
613 Bytes
import { createContext } from 'react';
import type { InstantSearch, UiState } from 'instantsearch.js';
export type InstantSearchServerContextApi<
TUiState extends UiState,
TRouteState = TUiState
> = {
/**
* Fowards search internals to the server execution context to access them
* in `getServerState()`.
*/
notifyServer(params: { search: InstantSearch<TUiState, TRouteState> }): void;
};
export const InstantSearchServerContext =
createContext<InstantSearchServerContextApi<UiState, UiState> | null>(null);
if (__DEV__) {
InstantSearchServerContext.displayName = 'InstantSearchServer';
}