4IT580: Docs
4IT580 WebGithub

4th Practical Class:
Prettier, Rules of Hooks, Forms

EditorConfig

.editorconfig example:

Prettier

Prettier in Atom (and other editors)

.prettierrc.yaml example:

Rules of Hooks

1. Only Call Hooks at the Top Level

Don’t call Hooks inside loops, conditions, or nested functions:

2. Only Call Hooks from React Functions

Don’t call Hooks from regular JavaScript functions.

Only call them from:

Custom Hooks

React Inputs

Controlled input - you provide:

Input and Array.filter()

React Forms - Formik

Formik Validations

Reusable Field with useField Hook

Formik Limits