0 0
Read Time20 Second

sumber : https://www.npmjs.com/package/react-device-detect

  1. Install react-device-detect pake npm
    npm install react-device-detect --save
  2. import isMobilyOnly
    import {isMobileOnly} from "react-device-detect";
  3. Isi componentnya

class App extends Component{
renderContent = () => {
if (isMobileOnly) {
return (
<div>Ini Isi Mobile, bisa di kasih route dll dll
</div>
)
}
return (
<div>Ini Isi desktop</div>
)
}
render() {return this.renderContent();}
}

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Previous post Mengaktifkan Emmet di File Javascript (js)
Next post Cara Mengatur Email domain sendiri di Gmail menggunakan pop3

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *