You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/philosophy.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,13 @@ Every well-established project should have a philosophy that guides its developm
7
7
8
8
This document outlines the core principles that drive the development and feature-set of TanStack Form.
9
9
10
-
# Upgrading unified APIs
10
+
##Upgrading unified APIs
11
11
12
12
APIs come with tradeoffs. As a result, it can be tempting to make each set of tradeoffs available to the user through different APIs. However, this can lead to a fragmented API that is harder to learn and use.
13
13
14
14
While this may mean a higher learning curve, it means that you don't have to question which API to use internally or have higher cognitive overhead when switching between APIs.
15
15
16
-
# Forms need flexibility
16
+
##Forms need flexibility
17
17
18
18
TanStack Form is designed to be flexible and customizable. While many forms may conform to similar patterns, there are always exceptions; especially when forms are a core component of your application.
19
19
@@ -25,7 +25,7 @@ As a result, TanStack Form supports multiple methods for validation:
25
25
-**Custom error messages**: You can customize the error messages for each field by returning any object from a validator.
26
26
-**Async validation**: You can validate fields asynchronously and have common utils like debouncing and cancellation handled for you.
27
27
28
-
# Controlled is Cool
28
+
##Controlled is Cool
29
29
30
30
In a world where controlled vs uncontrolled inputs are a hot topic, TanStack Form is firmly in the controlled camp.
31
31
@@ -37,7 +37,7 @@ This comes with a number of advantages:
37
37
-**Enhanced conditional logic**: You can easily conditionally show/hide fields based on the form state.
38
38
-**Debugging**: You can easily log the form state to the console to debug issues.
39
39
40
-
# Generics are grim
40
+
##Generics are grim
41
41
42
42
You should never need to pass a generic or use an internal type when leveraging TanStack Form. This is because we've designed the library to inference everything from runtime defaults.
43
43
@@ -60,7 +60,7 @@ useForm({
60
60
});
61
61
```
62
62
63
-
# Libraries are liberating
63
+
##Libraries are liberating
64
64
65
65
One of the main objectives of TanStack Form is that you should be wrapping it into your own component system or design system.
0 commit comments