This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In main App or Layout component add following: | |
const isMobile = useMediaQuery({ maxWidth: 767 }); // From react-responsive, Material UI or other styling library | |
useEffect(() => { | |
// Due to SSR/SSG we can not set 'app-layout onMobile' or 'app-layout onDesktop' on the server | |
// If we modify className using JS, we will got Warning: Prop `className` did not match. Server: "app-layout" Client: "app-layout onDesktop" | |
// So we have to apply document.body.class using the hook :) | |
if (isMobile) { | |
document.body.classList.remove('onDesktop'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After install zsh | |
- brew update | |
- brew install nvm | |
- mkdir ~/.nvm | |
after in your ~/.zshrc or in .bash_profile if your use bash shell: | |
export NVM_DIR=~/.nvm | |
source $(brew --prefix nvm)/nvm.sh |