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

Changed Hook Order Error #416

Open
transmissions11 opened this issue May 13, 2021 · 6 comments
Open

Changed Hook Order Error #416

transmissions11 opened this issue May 13, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@transmissions11
Copy link
Collaborator

Screen Shot 2021-05-12 at 10 54 36 PM

@transmissions11 transmissions11 added the bug Something isn't working label May 13, 2021
@Nathan-Patnam
Copy link

@sharad-s you mind if I take a look at this?

@transmissions11
Copy link
Collaborator Author

transmissions11 commented Jul 1, 2021

@sharad-s you mind if I take a look at this?

That'd be awesome! Sharad's working on our redesign atm so this is free for the taking :)

@Nathan-Patnam
Copy link

Nathan-Patnam commented Jul 1, 2021

So I think what's happening here is that we are using nested animations when using the Flip component from react-awesome-reveal. We do this when generating icons in

<Flip delay={300}>
.

There's a similar open issue already logged in the react-awesome-reveal repo for the Fade component awesome-reveal/react-awesome-reveal#57, and one of the devs explained that it's because of how an internal dependency they use is causing it. I tried a couple of different dependency combinations with emotion and react-awesome-reveal, but it wasn't able to get the flip component to render without the error.

It's a warning, so it's probably not the end of the world. IF you wanted to remove the warning, you could remove the flip entirely (which you can see in this pull request #429 (comment)), and you would probably want to remove it for the other icons in that file. There might be a way we could manually create the flip with CSS, but I'm not 100% sure (we could probably look further into the source code of the flip component to see what they're doing).

I think we should probably keep the issue open, but let me know if there is anything else I can do about this one. The last thing I will probably poke into is what parent or grandparent component that eventually renders the icons is causing the discrepancy. @TransmissionsDev

@transmissions11
Copy link
Collaborator Author

transmissions11 commented Jul 1, 2021

So I think what's happening here is that we are using nested animations when using the Flip component from react-awesome-reveal. We do this when generating icons in

Wow great analysis, really appreciate it!

Do you know what other animation the Logo is nested in besides the Flip?

Overall I'd probs lean on the side of leaving it atm, but if we can remove another animation to get this to stop, I'm cool with that.

@Nathan-Patnam
Copy link

Nathan-Patnam commented Jul 1, 2021

I'm not specifically sure why it's causing it, but the Column component we have in our utilities

export const Column = ({

which we create here

renders whatever children components we put inside of it (which eventually renders a then the logo with the component. If I replaced this column utility with a div or instead place the logo directly in there, it doesn't error out. I'll probably poke around a bit more when I get some free time

@transmissions11
Copy link
Collaborator Author

transmissions11 commented Jul 1, 2021

Odd. Could be because Column renders a Flex?

btw if you'd like to help develop this webapp full or part time with us feel free to reach out on Discord: t11s#1559 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants