1.0.14 • Published 6 months ago
@pantha/query v1.0.14
@pantha/toast
Pantha is a light library of reusable React components to help you ship faster. It is still in development and more components will be added at regular intervals.
Documentation
Import
import { useQuery } from "@pantha/query"
Usage
Call useQuery as a hook and assign it to a variable name of your choice. We used toast here as an example.
export default () => {
const toast = useToast();
console.log(toast)
// Suppose URL is https://localhost:3000/?viewMode=dark&role=admin&name=Pantha
// Console log should return { viewMode: "dark", role: "admin", name: "Pantha" }
return (
<div></div>
);
};
Installation
To use @pantha/query, install the package by running:
yarn add @pantha/query
# or
npm i @pantha/query