Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): recommend formik and typescript by default #834

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions app/pages/docs/cli-new.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ name.

#### Options

| Argument | Short | Description | Default |
| ---------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `--template` | | Lets you choose a project's template. If omittied, it shows a prompt to choose the template. Options: `full`, `minimal`. | None |
| `--language` | | A new project's language. If omittied, it shows a prompt to choose the language. Options: `typescript`, `javascript`. | None |
| `--dry-run` | `-d` | Displays what files would be generated but does not write the files to disk. | `false` |
| `--no-git` | | Skips git repository creation. | `false` |
| `--skip-upgrade` | | Skip blitz upgrade if outdated. | `false` |
| `--form` | | A form library for the full project. If omitted, it shows a prompt to choose the library. Options: `react-final-form`, `react-hook-form`, `formik`. | None |
| `--yarn` | | Use yarn as the package manager. | `false` |
| `--npm` | | Use npm as the package manager. | `false` |
| `--pnpm` | | Use pnpm as the package manager. | `false` |
| `--env` | `-e` | Set app environment name. [Read more](/docs/custom-environments#custom-environments). | None |
| Argument | Short | Description | Default |
| ---------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| `--template` | | Lets you choose a project's template. If omittied, it shows a prompt to choose the template. Options: `full`, `minimal`. | None |
| `--language` | | A new project's language. If omittied, it shows a prompt to choose the language. Options: `typescript`. | `typescript` |
| `--dry-run` | `-d` | Displays what files would be generated but does not write the files to disk. | `false` |
| `--no-git` | | Skips git repository creation. | `false` |
| `--skip-upgrade` | | Skip blitz upgrade if outdated. | `false` |
| `--form` | | A form library for the full project. If omitted, it shows a prompt to choose the library. Options: `formik`, `react-final-form`, `react-hook-form`. | None |
| `--yarn` | | Use yarn as the package manager. | `false` |
| `--npm` | | Use npm as the package manager. | `false` |
| `--pnpm` | | Use pnpm as the package manager. | `false` |
| `--env` | `-e` | Set app environment name. [Read more](/docs/custom-environments#custom-environments). | None |

#### Examples

Expand Down
2 changes: 1 addition & 1 deletion app/pages/docs/tutorial.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ blitz new my-blitz-app
Blitz will create a `my-blitz-app` folder in your current folder. You will
be asked how you want your new app to be. For this tutorial, select all
the default values by only pressing **Enter** when asked (you'll create a
Full Blitz app with TypeScript, npm and React Final Form).
Full Blitz app with TypeScript, npm and Formik).

Let’s look at what `blitz new` created:

Expand Down
10 changes: 5 additions & 5 deletions app/pages/docs/utilities.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This utility function will validate input using a
[`zod`](https://github.com/colinhacks/zod) schema, and format any errors
to be usable with your form library.

This is currently compatible with both React Final Form and Formik and any
This is currently compatible with both Formik, React Final Form and any
others with the same API.

### Example {#validate-zod-schema-example}
Expand All @@ -27,7 +27,7 @@ import {validateZodSchema} from 'blitz'

### API {#validate-zod-schema-api}

```js
```ts
const validationFunction = validateZodSchema(MyZodSchema)
```

Expand All @@ -46,7 +46,7 @@ A validation function to pass to a Form component's `validate` prop. It
accepts some values and returns an Promise or object containing any
errors.

```
```ts
(values: any, parserType?: "sync" | "async") => Promise<Object> | Object
```

Expand All @@ -62,7 +62,7 @@ errors.
This utility function will take a ZodError and format it nicely to be
usable with your form library.

This is currently compatible with both React Final Form and Formik and any
This is currently compatible with both Formik, React Final Form and any
others with the same API.

### Example {#format-zod-error-example}
Expand Down Expand Up @@ -95,4 +95,4 @@ const formattedErrorsObject = formatZodError(myZodError)

#### Returns

An object with errors that makes the same shape as the original schema
An object with errors that makes the same shape as the original schema
Loading