col

×Welcome aboard! We are happy you are here and wish you good net-raft!



Together We Can Simplify The World

the current number of solutions:  2274
 (1x)    .htaccess (1x)    AJAX (13x)    ANGULARJS (154x)    ASP (1x)    ASP.NET (4x)    BACKBONE.JS (47x)    BOOTSTRAP (12x)    C# (212x)    COFFEESCRIPT (28x)    CSS (71x)    HTML (47x)    JADE (32x)    JAVA (51x)    JAVASCRIPT (425x)    JQUERY (374x)    JQUERY MOBILE (5x)    JSON (5x)    LARAVEL (21x)    MYSQL (9x)    NODEJS (143x)    ORACLE SQL (19x)    PERL (1x)    PHP (291x)    PYTHON (9x)    REACT (61x)    RUBY (23x)    RUBY ON RAILS (1x)    SHELL (1x)    SQL (87x)    SQL SERVER (3x)    TYPESCRIPT (50x)    VB.NET (26x)    W3.CSS (6x)    W3.JS (40x)    
join us

click to create your account

The most viewed REACT solutions by country
Solution Country
How to get client ip address using react ?Cinque Terre
How to get client ip address using react ?Cinque Terre
How to get client ip address using react ?Cinque Terre
How to get client ip address using react ?Cinque Terre
How to get client ip address using react ?Cinque Terre

The most helpful REACT solutions
Likes Solution Technology
112 How to get client ip address using react ?REACT
77 how to get the type of a device using react ?REACT
41 how to detect a mobile device not tablet using react ?REACT
39 How to get latitude and longitude using react/javascript ?REACT
31 how to detect a mobile device using react ?REACT
Check out all of REACT ...

detect desktop, laptop or tablet, mobile phone react

(react detect desktop laptop tablet)

- REACT

 viewed 41

Comment:
REACT

0

// at first you install npm install react-responsive --save

import React from 'react';
import MediaQuery from 'react-responsive';

class App extends React.Component {
render() {
return (
<div>
<MediaQuery query='(min-device-width: 1224px)'>
<div>desktop or laptop</div>
</MediaQuery>
<MediaQuery query='(max-device-width: 1224px)'>
<div>tablet or mobile phone</div>
</MediaQuery>
</div>
);
}
}

export default App;

     

created: 2 months ago

The power of the user (%)

7%

Do you know a little more effective code ? Feel free to optimize ...


haven't you found what you're looking for ?
Write us your question ...
Login is not needed.