Skip to content

Commit

Permalink
Merge pull request #9 from XionWCFM/pages
Browse files Browse the repository at this point in the history
[2024.08.12] Funnel Client Docs Update
  • Loading branch information
XionWCFM authored Aug 12, 2024
2 parents 3f3c77f + 6b4efb6 commit cc674a5
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,15 @@ Using createStep, you can create, delete, or update the query string for the nex

## Funnel Client

Funnel Client provides utility functions to help manage query string funnels.
`funnel client` is a class that receives funneloptions as a parameter.

```tsx
<Link href={new FunnelClient(basicFunnelOptions()).createStep("a")}>
Go To Basic Funnel
</Link>
```

it doesn't depend on React, you can create the necessary steps anywhere as long as you have funnelOptions.

### FunnelClient.createStep

Expand All @@ -292,6 +300,12 @@ For deleteQueryParams, enter the key value of queryParams you want to delete. qs

In the case of `prefix` and `qsOptions.addQueryPrefix`, if entered as options in createStep, the value is used. Otherwise, the value entered in funnelOptions is used.

If you are dealing with multiple funnels or using query strings for other purposes, it is recommended to enter `searchParams`. When `searchParams` are input, a new funnel step is updated while maintaining the searchParams.

`deleteQueryParams` is meaningful when there is a searchParams input.

This is used to clear queryStrings that are no longer used in searchParams and is mainly used to control rendering in nested funnel use cases.

# Examples

## Default Step Example
Expand Down

0 comments on commit cc674a5

Please sign in to comment.