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

docs: Change form composition graph #1282

Merged
merged 1 commit into from
Mar 15, 2025
Merged

Conversation

SzymonNadbrzezny
Copy link
Contributor

@SzymonNadbrzezny SzymonNadbrzezny commented Mar 15, 2025

... for improving readability in dark mode

Solves: #1258

Change form composition grap to have solid backgrounds for better readbility in dark mode
Copy link
Member

@Balastrong Balastrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Balastrong Balastrong merged commit 281075c into TanStack:main Mar 15, 2025
1 check passed
@SzymonNadbrzezny
Copy link
Contributor Author

Mermaid graph code as well if anyone might need it in the future.

graph TD;

    S1 --"Yes"--> S2
    S1 --"No"--> S3

    S3 --"Yes"--> S4
    S3 --"No"-->S5

    S5 --"Yes"--> S6
    S5 --"No"--> S7

    S6 --"Yes"--> S8
    S6 --"No"--> S9

    S7 --"Yes"--> S10
    S7 --"No"--> S11
    
    S1["Do you need to reuse state (like defaultValues)?"];
    S2["Use 'formOptions()"];
    S3["Do you need to custom validation functions?"];
    S4["Wrap 'useForm' hook into custom app hook"];
    S5["Do you need to reuse custom UI components?"];
    S6["Do you need access to the 'field'?"];
    S7["Do you need to reuse whole subsections of your form?"];
    S8["Use 'createFormHooks''s 'fieldComponents' (EG: 'TextInput' and 'NumberInput')"];
    S9["Use 'createFormsHook''s 'formComponents' (EG: 'SubmitButton')"];
    S10["Use 'withForm' from 'createFromHook'"];
    S11["Use 'form.Subscribe' and 'form.Field'"];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants