From 2cccb03800c54f012e201b37c4dfe888d27b6995 Mon Sep 17 00:00:00 2001 From: bowlingx Date: Wed, 4 Dec 2019 16:20:18 -0600 Subject: [PATCH] chore(readme): updated readme --- README.md | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 080c105..0f21a15 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,31 @@ # Geschichte +![CircleCI](https://img.shields.io/circleci/build/gh/BowlingX/geschichte) +![Codecov](https://img.shields.io/codecov/c/github/bowlingx/geschichte) +![npm](https://img.shields.io/npm/v/geschichte) + Let's you manage query-parameters with hooks. Uses `immer` and `zustand` to manage the internal state. -## Example +Documentation: https://bowlingx.github.io/geschichte/index.html + +API: https://bowlingx.github.io/geschichte/api/index.html + + yarn add geschichte + + npm install geschichte + +## Basic Example ```typescript jsx import { pm, factoryParameters, serializers } from 'geschichte' const parameterConfig = { - your: { - object: { - somewhere: pm('queryParameter', serializers.string) - } - } + item: pm('queryParameter', serializers.string) }; const defaultValue = { - your: { - object: { - somewhere: 'defaultValue' - } - } + item: 'defaultValue' } @@ -31,8 +35,8 @@ const Component = () => { const { values, pushState, replaceState } = useQuery() return ( <> - - + +
{JSON.stringify(values)}
)