Skip to content

Commit 405578c

Browse files
Merge pull request #1 from SophanySC/main
Realligning
2 parents 09d81ce + fe4ed7e commit 405578c

File tree

8 files changed

+42
-7
lines changed

8 files changed

+42
-7
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"commit": false,
55
"linked": [],
66
"access": "public",
7-
"baseBranch": "master",
7+
"baseBranch": "main",
88
"updateInternalDependencies": "patch",
99
"ignore": []
1010
}

.changeset/wise-games-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"formik": patch
3+
---
4+
5+
Mark `formik` as side-effect free in `package.json`

docs/guides/form-submission.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ To submit a form in Formik, you need to somehow fire off the provided `handleSub
2323

2424
### Submission
2525

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

2931
## Frequently Asked Questions
3032

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

5759
</details>
60+
61+
<details>
62+
<summary>Why does `isSubmitting` remain true after submission?</summary>
63+
64+
If the submission handler returns a promise, make sure it is correctly resolved or rejected when called.
65+
66+
If the submission handler does not return a promise, make sure `setSubmitting(false)` is called at the end of the handler.
67+
68+
</details>

packages/formik-native/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# formik-native
22

3+
## 2.1.27
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`ae0fe6c`](https://github.com/jaredpalmer/formik/commit/ae0fe6cbd11f2d2664142008225abc237b5bff82), [`ae0fe6c`](https://github.com/jaredpalmer/formik/commit/ae0fe6cbd11f2d2664142008225abc237b5bff82)]:
8+
9+
310
## 2.1.26
411

512
### Patch Changes

packages/formik-native/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "formik-native",
3-
"version": "2.1.26",
3+
"version": "2.1.27",
44
"license": "Apache-2.0",
55
"author": "Jared Palmer <[email protected]>",
66
"repository": "formium/formik",
@@ -30,7 +30,7 @@
3030
"react": ">=16.8.0"
3131
},
3232
"dependencies": {
33-
"formik": "2.4.3"
33+
"formik": "2.4.4"
3434
},
3535
"devDependencies": {
3636
"@react-native-community/eslint-config": "^0.0.5",

packages/formik/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# formik
22

3+
## 2.4.4
4+
5+
### Patch Changes
6+
7+
- [`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`
8+
9+
- [`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`
10+
11+
- [`5c01ee7`](https://github.com/jaredpalmer/formik/commit/5c01ee77b312ff6c375d43f841fe9fbe5846ebd9) [#3872](https://github.com/jaredpalmer/formik/pull/3872) Thanks @rajpatelbot! - FIX: Fixed resetForm function dependency issue
12+
13+
314
## 2.4.3
415

516
### Patch Changes

packages/formik/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "formik",
33
"description": "Build forms in React, without the tears",
4-
"version": "2.4.3",
4+
"version": "2.4.4",
55
"license": "Apache-2.0",
66
"author": "Jared Palmer <[email protected]> (https://jaredpalmer.com)",
77
"contributors": [
@@ -37,6 +37,7 @@
3737
"peerDependencies": {
3838
"react": ">=16.8.0"
3939
},
40+
"sideEffects": false,
4041
"scripts": {
4142
"test": "tsdx test --env=jsdom",
4243
"test:watch": "npm run test -- --watchAll",

website/src/blog/new-docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ I accidentally discovered the new version of docsearch.js while working on the d
117117

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

120-
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).
120+
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).
121121

122122
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.
123123

0 commit comments

Comments
 (0)