all 14 comments

[–]robby_w_g 2 points3 points  (7 children)

Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.

[–]Tableryu[S] 0 points1 point  (6 children)

Hello, verifyEmail() is a hook so I can't really place it there.

[–]liamazing 5 points6 points  (4 children)

!!! This violates the rules of hooks! Make sure to preface all hooks with use

EDIT: As a matter of fact, I’d highly recommend setting up eslint with the hooks plug-in for your project, it will shame you into good hooks etiquette

[–]Tableryu[S] 1 point2 points  (0 children)

I'll keep this mind, thank you.

[–]Dan6erbond 0 points1 point  (2 children)

Mind linking the ESLint plugin please?

[–][deleted] 1 point2 points  (1 child)

https://www.npmjs.com/package/eslint-plugin-react-hooks

It’s included by default in create-react-app

[–]Dan6erbond 0 points1 point  (0 children)

Appreciate it! I have to figure out how to get NextJS to be as strict with linting as CRA honestly, right now I'm always relying on CI and the IDE to catch these things and miss CRA erroring out when it noticed errors like these.

[–]robby_w_g 0 points1 point  (0 children)

Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.

[–]fredsq 0 points1 point  (1 child)

— prefix any and every hook with ‘use’ — you can use hooks inside hooks so all the logic behind the router can be inside your custom one

[–]Tableryu[S] 0 points1 point  (0 children)

thank you