Skip to content

Commit

Permalink
Merge pull request #30 from asmyshlyaev177/action_md
Browse files Browse the repository at this point in the history
ci: check for broken links in markdown
  • Loading branch information
asmyshlyaev177 authored Nov 16, 2024
2 parents c02f193 + 0e4cd35 commit 06866d9
Show file tree
Hide file tree
Showing 10 changed files with 264 additions and 234 deletions.
460 changes: 236 additions & 224 deletions .github/workflows/tests.yml

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions .linkspector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
dirs:
- ./
- ./packages/urlstate

files:
- README.md

excludedDirs:
- ./packages/example-nextjs14
- ./packages/example-nextjs15
- ./packages/example-react
- ./packages/example-react-router6
- ./packages/shared

useGitIgnore: true

# doesn't work correctly
# modifiedFilesOnly: true
2 changes: 1 addition & 1 deletion README.CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pnpm add state-in-url

## Next.js的useUrlState钩子

[文档](packages/urlstate/next/useUrlState#api)
[文档](packages/urlstate/next/useUrlState)

`useUrlState`是一个为Next.js应用程序设计的自定义React钩子,使客户端组件之间的通信变得简单。它允许你共享任何复杂的状态并将其与URL搜索参数同步,提供了一种在页面重新加载之间持久化状态并通过URL共享应用程序状态的方法。

Expand Down
2 changes: 1 addition & 1 deletion README.KO.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pnpm add state-in-url

## Next.js용 useUrlState 훅

[문서](packages/urlstate/next/useUrlState#api)
[문서](packages/urlstate/next/useUrlState)

`useUrlState`는 Next.js 애플리케이션을 위한 사용자 정의 React 훅으로, 클라이언트 컴포넌트 간의 통신을 쉽게 만듭니다. 복잡한 상태를 공유하고 URL 검색 매개변수와 동기화할 수 있게 해주어, 페이지 새로고침 시 상태를 유지하고 URL을 통해 애플리케이션 상태를 공유할 수 있습니다.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Share if it useful for you.
<hr />

</div>

## Why use `state-in-url`?

Store any user state in query parameters; imagine JSON in a browser URL, while keeping types and structure of data, e.g. numbers will be decoded as numbers not strings, objects and arrays supported.
Expand Down Expand Up @@ -136,7 +136,7 @@ All components that use the same `state` object are automatically synchronized.

### useUrlState hook for Next.js

[Full API Docs](packages/urlstate/next/useUrlState#api)
[Full API Docs](packages/urlstate/next/useUrlState)

[React-Router example](#useurlstate-hook-for-react-router)

Expand Down Expand Up @@ -450,7 +450,7 @@ function SettingsComponent() {

API is same as for Next.js version, except can pass options from [NavigateOptions](https://github.com/remix-run/react-router/blob/bc693ed9f39170bda13b9e1b282fb8e9d5925f66/packages/react-router/lib/context.ts#L99) type.

[API Docs](packages/urlstate/react-router/useUrlState#api)
[API Docs](packages/urlstate/react-router/useUrlState)

#### Example

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"reinstall": "npm run cleanup && npm install",
"setup": "playwright install --with-deps",
"prepack": "npm run build && cp package.json dist/package.json && npm run build:demo",
"pin-gh-deps": "pin-github-action .github/workflows/tests.yml",
"pin-gh-deps": "pin-github-action -i .github/workflows/tests.yml",
"prepare": "npx husky"
},
"wireit": {
Expand Down
2 changes: 1 addition & 1 deletion packages/urlstate/next/useUrlState/useUrlState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function useUrlState<T extends JSONCompatible>({
* // same as setState(form) with setUrl(form)
* ```
*
* * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/next/useUrlState#api}
* * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/next/useUrlState}
*/
export function useUrlState<T extends JSONCompatible>(
defaultState: T,
Expand Down
2 changes: 1 addition & 1 deletion packages/urlstate/react-router/useUrlState/useUrlState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function useUrlState<T extends JSONCompatible>({
* // same as setState(form) with setUrl(form)
* ```
*
* * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/react-router/useUrlState#api}
* * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/react-router/useUrlState}
*/
export function useUrlState<T extends JSONCompatible>(
defaultState: T,
Expand Down
2 changes: 1 addition & 1 deletion packages/urlstate/useUrlEncode/useUrlEncode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { type JSONCompatible, typeOf } from "../utils";
* parse('name=Tom');
* ```
*
* * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/useUrlEncode#api}
* * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/master/packages/urlstate/useUrlEncode}
*/
export function useUrlEncode<T extends JSONCompatible>(stateShape: T) {
const stringify = React.useCallback(
Expand Down
2 changes: 1 addition & 1 deletion packages/urlstate/useUrlStateBase/useUrlStateBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
*
* ```
*
* * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/integrations/packages/urlstate/useUrlStateBase#api}
* * Docs {@link https://github.com/asmyshlyaev177/state-in-url/tree/integrations/packages/urlstate/useUrlStateBase}
*/

export function useUrlStateBase<T extends JSONCompatible>(
Expand Down

0 comments on commit 06866d9

Please sign in to comment.