How to use the enquire-js.enquireScreen function in enquire-js

To help you get started, we’ve selected a few enquire-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maoxiaoquan / kite / admin / src / containers / Manager / view / Manager.js View on Github external
componentDidMount() {
    this.eHandler = enquireScreen(mobile => {
      const { isMobile } = this.state
      if (isMobile !== mobile) {
        this.setState({
          isMobile: mobile
        })
      }
    })
    this.props.dispatch(
      getAdminUserInfo({}, result => {
        console.log('result', result)
        if (result.website) {
          document.title = result.website.website_name
        }
      })
    )
  }
github alibaba-fusion / materials / react-materials / blocks / CompositeFilter / src / CompositeFilter.jsx View on Github external
enquireScreenRegister = () => {
    const mediaCondition = 'only screen and (max-width: 720px)';

    enquireScreen((mobile) => {
      this.setState({
        isMobile: mobile,
      });
    }, mediaCondition);
  };
github alibaba-fusion / materials / react-materials / blocks / ProgressDataList / src / ProgressDataList.jsx View on Github external
enquireScreenRegister = () => {
    const mediaCondition = 'only screen and (max-width: 720px)';

    enquireScreen((mobile) => {
      this.setState({
        isMobile: mobile,
      });
    }, mediaCondition);
  };
github ice-lab / react-materials / blocks / ProgressDataList / src / index.jsx View on Github external
const enquireScreenRegister = () => {
    const mediaCondition = 'only screen and (max-width: 720px)';

    enquireScreen((mobile) => {
      setMobile(mobile);
    }, mediaCondition);
  };
github alibaba / ice / react-materials / blocks / ComplexDialog / src / ComplexDialog.jsx View on Github external
enquireScreenRegister = () => {
    const mediaCondition = 'only screen and (max-width: 720px)';

    enquireScreen((mobile) => {
      this.setState({
        isMobile: mobile,
      });
    }, mediaCondition);
  };
github alibaba / ice / react-materials / blocks / ConfirmDialog / src / ConfirmDialog.jsx View on Github external
enquireScreenRegister = () => {
    const mediaCondition = 'only screen and (max-width: 720px)';

    enquireScreen((mobile) => {
      this.setState({
        isMobile: mobile,
      });
    }, mediaCondition);
  };
github hyperledger / cello / src / static / dashboard / src / layouts / BasicLayout.js View on Github external
componentDidMount() {
    enquireScreen(mobile => {
      this.setState({
        isMobile: mobile,
      });
    });
  }
  getPageTitle() {
github hyperledger / cello / user-dashboard / src / app / assets / src / layouts / BasicLayout.js View on Github external
componentDidMount() {
    enquireScreen(mobile => {
      this.setState({
        isMobile: mobile,
      });
    });
  }
  getPageTitle() {
github goodrain / rainbond-ui / src / layouts / BasicLayout.js View on Github external
componentDidMount() {
    enquireScreen(mobile => {
      this.setState({ isMobile: mobile });
    });
    this.fetchUserInfo();
    this.setState({ showAuthCompany: this.props.showAuthCompany });
    var query = qs.parse(this.props.location.search);
    if (query && query.market_info) {
      this.setState({ market_info: query.market_info });
      this.setState({ showAuthCompany: true });
    }
  }
  onOpenRegion = () => {
github kuhami / react-ant-pro / src / layouts / BasicLayout.js View on Github external
componentDidMount() {
    this.props.history.push({ pathname : '/'  })
    enquireScreen(mobile => {
      this.setState({
        isMobile: mobile,
      });
    });
    this.props.dispatch({
      type: 'user/fetchCurrent',
    });
  }
  getPageTitle() {

enquire-js

avoid server-side rendering errors.

MIT
Latest version published 7 years ago

Package Health Score

45 / 100
Full package analysis

Popular enquire-js functions

Similar packages