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

refacto: remove useless useEffect #146

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Conversation

baptou12
Copy link
Contributor

@baptou12 baptou12 commented Oct 30, 2023

You don’t need Effects to transform data for rendering. (https://react.dev/learn/you-might-not-need-an-effect)

Les useEffect c'est surtout pour les dépendances externes, call api par exemple. Ici le call api est fait dans un useEffect (dans un hook perso useFetchInstitutionsData) et ensuite la filtration/ordonnancement n'a plus besoin d'en utiliser.

Copy link
Contributor

@Shamzic Shamzic left a comment

Choose a reason for hiding this comment

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

Iso, ok pour moi

@baptou12 baptou12 merged commit 0731530 into main Nov 6, 2023
3 checks passed
@guillett guillett deleted the remove_useless_useeffect branch February 7, 2024 09:59
@guillett guillett added this to the Passé milestone Mar 22, 2024
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.

3 participants