React-responsive is throwing dispatcher is null

16 Views Asked by At

I have a component that is not rendering but throwing an error? The error can be find below.

import React from 'react';
import { useMediaQuery } from 'react-responsive';

export function Posts() {
    const isMobile = useMediaQuery({ query: '(max-width: 767px)' });

    return (
        <div>
            
        </div>
    );
}
ERROR
dispatcher is null
useContext@https://localhost:44416/static/js/bundle.js:66419:7
useDevice@https://localhost:44416/static/js/bundle.js:64892:78
useMediaQuery@https://localhost:44416/static/js/bundle.js:64947:35
Posts@https://localhost:44416/main.10a36012ac7f4ce8275a.hot-update.js:33:83
renderWithHooks@https://localhost:44416/static/js/bundle.js:38916:31
...
0

There are 0 best solutions below