Search
Purpose
The Search component is a wrapper for the useSearch hook, it provides a simple way to access and update the search terms while also handling special logic such as redirects.
Usage
import React from "react";
import { Search } from "@usereactify/search";
import { ExampleSearch } from "./ExampleSearch";
export const Component: React.FC = () => {
return (
<Search
render={ExampleSearch}
/>
);
};
Props
type SearchProps = {
/** Render method */
render?: React.FC<ReturnType<typeof useSearch>>;
};
Last updated
Was this helpful?