Skip to content

Commit

Permalink
Merge pull request #1 from SophanySC/main
Browse files Browse the repository at this point in the history
Realligning
  • Loading branch information
DavideFrancescon authored Sep 11, 2023
2 parents 09d81ce + fe4ed7e commit 405578c
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "master",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/wise-games-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"formik": patch
---

Mark `formik` as side-effect free in `package.json`
15 changes: 13 additions & 2 deletions docs/guides/form-submission.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ To submit a form in Formik, you need to somehow fire off the provided `handleSub

### Submission

- Proceed with running your submission handler (i.e.`onSubmit` or `handleSubmit`)
- _you call `setSubmitting(false)`_ in your handler to finish the cycle
- Proceed with running the submission handler (i.e. `onSubmit` or `handleSubmit`)
- Did the submit handler return a promise?
- Yes: Wait until it is resolved or rejected, then set `setSubmitting` to `false`
- No: _Call `setSubmitting(false)`_ to finish the cycle

## Frequently Asked Questions

Expand Down Expand Up @@ -55,3 +57,12 @@ Disable whatever is triggering submission if `isSubmitting` is `true`.
If `isValidating` is `true` and `isSubmitting` is `true`.

</details>

<details>
<summary>Why does `isSubmitting` remain true after submission?</summary>

If the submission handler returns a promise, make sure it is correctly resolved or rejected when called.

If the submission handler does not return a promise, make sure `setSubmitting(false)` is called at the end of the handler.

</details>
7 changes: 7 additions & 0 deletions packages/formik-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# formik-native

## 2.1.27

### Patch Changes

- Updated dependencies [[`ae0fe6c`](https://github.com/jaredpalmer/formik/commit/ae0fe6cbd11f2d2664142008225abc237b5bff82), [`ae0fe6c`](https://github.com/jaredpalmer/formik/commit/ae0fe6cbd11f2d2664142008225abc237b5bff82)]:
- formik@2.4.4

## 2.1.26

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/formik-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "formik-native",
"version": "2.1.26",
"version": "2.1.27",
"license": "Apache-2.0",
"author": "Jared Palmer <jared@palmer.net>",
"repository": "formium/formik",
Expand Down Expand Up @@ -30,7 +30,7 @@
"react": ">=16.8.0"
},
"dependencies": {
"formik": "2.4.3"
"formik": "2.4.4"
},
"devDependencies": {
"@react-native-community/eslint-config": "^0.0.5",
Expand Down
11 changes: 11 additions & 0 deletions packages/formik/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# formik

## 2.4.4

### Patch Changes

- [`41720c2`](https://github.com/jaredpalmer/formik/commit/41720c2f69407e41c27b325923bce63436b07f45) [#3862](https://github.com/jaredpalmer/formik/pull/3862) Thanks @yazaldefilimonepinto! - Forward `className` for custom components used with `Field`

- [`da58b29`](https://github.com/jaredpalmer/formik/commit/da58b292c9c0b6029ae21ab4b5edff09dd877c1b) [#3858](https://github.com/jaredpalmer/formik/pull/3858) Thanks @alaanescobedo! - Remove use of deprecated `StatelessComponent` type in favor of `FunctionComponent`

- [`5c01ee7`](https://github.com/jaredpalmer/formik/commit/5c01ee77b312ff6c375d43f841fe9fbe5846ebd9) [#3872](https://github.com/jaredpalmer/formik/pull/3872) Thanks @rajpatelbot! - FIX: Fixed resetForm function dependency issue


## 2.4.3

### Patch Changes
Expand Down
3 changes: 2 additions & 1 deletion packages/formik/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "formik",
"description": "Build forms in React, without the tears",
"version": "2.4.3",
"version": "2.4.4",
"license": "Apache-2.0",
"author": "Jared Palmer <jared@palmer.net> (https://jaredpalmer.com)",
"contributors": [
Expand Down Expand Up @@ -37,6 +37,7 @@
"peerDependencies": {
"react": ">=16.8.0"
},
"sideEffects": false,
"scripts": {
"test": "tsdx test --env=jsdom",
"test:watch": "npm run test -- --watchAll",
Expand Down
2 changes: 1 addition & 1 deletion website/src/blog/new-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ I accidentally discovered the new version of docsearch.js while working on the d

![/images/blog/algolia-docsearch-screenshot.png](/images/blog/algolia-docsearch-screenshot.png)

Overall, I'm pretty happy with the new docs site. For the first time in a while, I'm excited to write docs again. There's still a decent amount of features still missing, but I'm very happy with the end-user experience and the developer experience that this stack provides. Next.js gives us a great foundation for building more app-like features into the docs site. The first of these will be a brand new interactive tutorial as well as a new searchable example and boilerplate directory. As always, if you're if you're interested helping out or diving deeper, the [full source code of the new docs is available on GitHub](https://github.com/formik/formik).
Overall, I'm pretty happy with the new docs site. For the first time in a while, I'm excited to write docs again. There's still a decent amount of features still missing, but I'm very happy with the end-user experience and the developer experience that this stack provides. Next.js gives us a great foundation for building more app-like features into the docs site. The first of these will be a brand new interactive tutorial as well as a new searchable example and boilerplate directory. As always, if you're interested helping out or diving deeper, the [full source code of the new docs is available on GitHub](https://github.com/formik/formik).

So with that, go poke around, but be gentle. If you find any bugs, [file an issue.](https://github.com/formik/formik/issues/new?template=Bug_report.md) With this new Notion-powered blog, I'll be posting a lot more often, so enter your email and slap that subscribe button in the footer to join the Formik mailing list.

Expand Down

0 comments on commit 405578c

Please sign in to comment.