isOpen is interpreted as !isOpen (opposite)
See original GitHub issueI was kind of confused as to why my menu was opening by default, but after some investigation, I figured out isOpen is being interpreted as !isOpen somewhere.
Maybe I misread the docs, but I was led to believe that passing <Menu isOpen={false} />
would mean the menu would not open by default. Then when I pass isOpen={true}
it renders not open.
It is working though, as of now, by just passing !this.state.isMenuOpen
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Cannot set useState hook value to opposite boolean
If onOutsideClick executes first, then React re-renders with isOpen=false , and then onClick executes second, it would set isOpen=true as ...
Read more >Open definition and meaning | Collins English Dictionary
If you say that a fact or question is open to debate, interpretation, or discussion, you mean that people are uncertain whether it...
Read more >Thesaurus article: willing to consider new or different ideas
Open-minded is the word with the broadest meaning. It refers to someone who is willing to consider new ideas or ideas that are...
Read more >be open to interpretation Definitions and Synonyms
Definition of BE OPEN TO INTERPRETATION (phrase): used about something whose meaning is not clear.
Read more >word request - What is the opposite of "busy schedule"?
'Open' usually equates to 'empty.' Otherwise, you'd run into issues like this: Person1: "How's your schedule tomorrow?" Person2: "My schedule is ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@MaralS no problem 😃
Now the issue is that the menu does not work well as a flex item.
If you add these styles to your
.mobile
class, the overlay is visible:@negomi @MaralS Sorry I’m not being helpful, but I’ve had 0 problems just running !isOpen, so that’s what I’m going to continue to do. If I do find some time I’ll try to make a new repo.