How to use the react-lazyload.forceCheck function in react-lazyload

To help you get started, we’ve selected a few react-lazyload 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 steamgriddb / steamgriddb-manager / src / js / games.jsx View on Github external
const fuse = new Fuse(items[platform], {
        shouldSort: true,
        threshold: 0.6,
        location: 0,
        distance: 100,
        maxPatternLength: 32,
        minMatchCharLength: 1,
        keys: [
          'name',
        ],
      });
      items[platform] = fuse.search(searchTerm);
    });
    this.setState({ items });

    forceCheck(); // Recheck lazyload
  }
github dvaJi / ReaderFront / src / works / containers / WorksContainer.js View on Github external
function WorksContainer() {
  const [textFilter, setTextFilter] = useState('');
  const { locale } = useIntl();
  const language = languageNameToId(locale);

  const { loading, error, data } = useQuery(FETCH_WORKS, {
    variables: { language }
  });
  if (loading) return ;
  if (error) return <p id="error_releases">Error :(</p>;

  forceCheck();

  return (
    <div>
      
      
      
    </div>
  );
}
github LeagueDevelopers / lol-skins-viewer / app / components / SkinsList / index.jsx View on Github external
componentDidUpdate (prevProps) {
    if (this.areAnimationsDisabled() && prevProps.skins !== this.props.skins) {
      forceCheck();
    }
  }
github JinJieTan / react-webpack / src / pages / home / index.jsx View on Github external
componentDidMount() {
        this.props.IndexActivityModule()
        forceCheck()
        this.myScroll = new BScroll(this.wrap.current, {
            bounce: false,
            scrollbar: true,
            probeType: 3,
            click: true, pullUpLoad: {
                threshold: 50
            }
        })
    }
    refresh = () => {
github Tarnadas / smmdb / website / src / client / modules / app / AppView.tsx View on Github external
private shouldUpdate (values: any): void {
    forceCheck()
    if (this.doUpdate) return
    const shouldUpdate =
      values.scrollHeight - values.scrollTop - values.clientHeight &lt;
      UPDATE_OFFSET
    if (shouldUpdate) {
      this.doUpdate = true
      if (this.state.fetchCourses) this.state.fetchCourses(true, STEP_LIMIT)
    }
  }

react-lazyload

Lazyload your components, images or anything where performance matters.

MIT
Latest version published 1 month ago

Package Health Score

86 / 100
Full package analysis