React Image onLoad event. This is a workaround for
onLoad
event not being triggered in SSR case.
$ yarn add react-image-onload
import ImageOnLoad from 'react-image-onload';
<ImageOnLoad
onLoad={({ width, height }: HTMLImageElement) => {}}
src="image"
alt="background image"
/>;
type Props = {
src: string,
onLoad: (image: HTMLImageElement) => Promise<void> | void,
};
$ yarn install --pure-lockfile
$ yarn start
$ yarn run format
$ yarn run eslint
$ yarn run flow
$ yarn run test:watch
$ yarn run build