Skip to content

Commit

Permalink
docs(decisions-0003): pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed Jul 15, 2022
1 parent 7c834d5 commit 0bb5f4c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ Again, the same goes for `useActionData`.
- Return type of `useLoaderData` and `useActionData` should somehow be inferred from `loader` and `action`, not blindly type cast
- Return type of `loader` and `action` should be inferred
- Necessarily, return type of `json` should be inferred from its input
- No module side-effects (so higher-order functions like `makeLoader` is definitely a no).
- `json` should allow everything that `JSON.stringify` allows.
- `json` should allow only what `JSON.stringify` allows.
- `useLoaderData` should not return anything that `JSON.parse` can't return.

### Key insight: `loader` and `action` are an _implicit_ inputs

Expand Down

0 comments on commit 0bb5f4c

Please # to comment.