Skip to content

Commit

Permalink
chore: codesandbox link of hook using
Browse files Browse the repository at this point in the history
  • Loading branch information
betula committed Dec 24, 2023
1 parent 68aef54 commit 0aeac5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ const form = useRecipeForm()

**And it can be with params of course**

The `signal` documentation see [here](/DOCUMENTATION.md#signalinitialvalue).
[![Edit example in Codesandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/nostalgic-galileo-p8ylnf?file=%2Fsrc%2FApp.tsx%3A20%2C1)

```typescript
import { hook, un, type SignalReadonly } from "ya-signals";
Expand All @@ -424,7 +424,9 @@ class RecipeForm {
export const useRecipeForm = hook(RecipeForm)
```

Somewhere inside React component function
The `signal` documentation see [here](/DOCUMENTATION.md#signalinitialvalue).

And using it somewhere inside React component function

```typescript
import { useRecipeForm } from './recipe-form.ts';
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ const form = useRecipeForm()

**And it can be with params of course**

[![Edit example in Codesandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/nostalgic-galileo-p8ylnf?file=%2Fsrc%2FApp.tsx%3A20%2C1)

```typescript
import { hook, un, type SignalReadonly } from "ya-signals";

Expand All @@ -90,7 +92,9 @@ class RecipeForm {
export const useRecipeForm = hook(RecipeForm)
```

Somewhere inside React component function
The `signal` documentation see [here](/DOCUMENTATION.md#signalinitialvalue).

And using it somewhere inside React component function

```typescript
import { useRecipeForm } from './recipe-form.ts';
Expand Down

0 comments on commit 0aeac5a

Please sign in to comment.