Skip to content

Conversation

@keemor
Copy link
Contributor

@keemor keemor commented Mar 3, 2022

'cleanUp =' is an error in ueh

'cleanUp =' is an error in ueh
@alDuncanson
Copy link
Owner

Hey, @keemor thanks for the pull request.

What do you mean it is an error?

@keemor
Copy link
Contributor Author

keemor commented Mar 8, 2022

Hi @alDuncanson

TypeScript says:

image

and in docs there is:
https://reactjs.org/docs/hooks-effect.html#example-using-hooks-1

useEffect(() => {
    
  
    return function cleanUp() {
      
    }
  }, []);

but it can also be as (this how my PR changes it):

useEffect(() => {
    
  
    return () => {
      
    }
  }, []);

Copy link
Owner

@alDuncanson alDuncanson left a comment

Choose a reason for hiding this comment

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

Ah alright, looks good 👍🏻

@alDuncanson alDuncanson merged commit d372a55 into alDuncanson:master Mar 8, 2022
@keemor keemor deleted the patch-1 branch March 8, 2022 15:03
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