Skip to content

Commit

Permalink
README - Add snippit to prefer JSON for best performance (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav authored Jul 24, 2024
2 parents cbc2058 + 89fdef0 commit c583cc2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/i18n/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ const fr_dict: Dict = {
};
```

When using large dictionary files, JSON files are [faster to load](https://www.youtube.com/watch?v=ff4fgQxPaO0). Additionally, we recommend keeping a flat JSON structure so you don't need to flatten the object on the client for best performance.

### With `createResource`

Example of using `@solid-primitives/i18n` with `createResource` to dynamically load directories for selected languages.
Expand Down

0 comments on commit c583cc2

Please sign in to comment.