Giter Club home page Giter Club logo

react-image-onload's Introduction

react-image-onload

React Image onLoad event.
This is a workaround for onLoad event not being triggered in SSR case.

Travis Codecov Status npm package npm downloads

Dependency Status devDependency Status peerDependency Status

prettier license

Installation

$ yarn add react-image-onload

Demo

Usage

import ImageOnLoad from 'react-image-onload';

<ImageOnLoad
  onLoad={({ width, height }: HTMLImageElement) => {}}
  src="image"
  alt="background image"
/>;

API

type Props = {
  src: string,
  onLoad: (image: HTMLImageElement) => Promise<void> | void,
};

Development

Requirements

  • node >= 9.8.0
  • yarn >= 1.5.1
$ yarn install --pure-lockfile
$ yarn start

Test

$ yarn run format
$ yarn run eslint
$ yarn run flow
$ yarn run test:watch
$ yarn run build

CONTRIBUTING

  • โ‡„ Pull requests and โ˜… Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests.

MIT: http://michaelhsu.mit-license.org

react-image-onload's People

Contributors

evenchange4 avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-image-onload's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): replace dependency babel-eslint with @babel/eslint-parser
  • chore(deps): update dependency babel-eslint to v8.2.6
  • chore(deps): update dependency eslint-config-prettier to v2.10.0
  • chore(deps): update dependency node to v9.11.2
  • fix(deps): update dependency ramda to ^0.29.0
  • chore(deps): update dependency babel-eslint to v10
  • chore(deps): update dependency babel-plugin-add-module-exports to v1
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-config-airbnb to v19
  • chore(deps): update dependency eslint-config-prettier to v9
  • chore(deps): update dependency eslint-plugin-flowtype to v8
  • chore(deps): update dependency eslint-plugin-jest to v28
  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency github-changes to v2
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency lint-staged to v15
  • chore(deps): update dependency node to v20
  • chore(deps): update dependency prettier to v3
  • chore(deps): update jest monorepo to v29 (major) (babel-jest, jest)
  • chore(deps): update react monorepo to v18 (major) (react, react-test-renderer)
  • chore(deps): update storybook monorepo (major) (@storybook/addon-actions, @storybook/addon-info, @storybook/addon-links, @storybook/addon-options, @storybook/addon-storyshots, @storybook/react)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • prop-types ^15.6.1
  • ramda ^0.25.0
  • @babel/cli 7.0.0-beta.42
  • @babel/core 7.0.0-beta.42
  • @babel/node 7.0.0-beta.42
  • @babel/preset-env 7.0.0-beta.42
  • @storybook/addon-actions 3.3.15
  • @storybook/addon-info 3.3.15
  • @storybook/addon-links 3.3.15
  • @storybook/addon-options 3.3.15
  • @storybook/addon-storyshots 3.3.15
  • @storybook/react 3.3.15
  • babel-core 7.0.0-bridge.0
  • babel-eslint 8.2.2
  • babel-jest 22.4.3
  • babel-plugin-add-module-exports 0.2.1
  • codecov 3.0.0
  • enzyme 3.3.0
  • enzyme-adapter-react-16 1.1.1
  • enzyme-to-json 3.3.3
  • eslint 4.19.0
  • eslint-config-airbnb 16.1.0
  • eslint-config-prettier 2.9.0
  • eslint-plugin-flowtype 2.46.1
  • eslint-plugin-import 2.9.0
  • eslint-plugin-jest 21.15.0
  • eslint-plugin-jsx-a11y 6.0.3
  • eslint-plugin-prettier 2.6.0
  • eslint-plugin-react 7.7.0
  • flow-bin 0.68.0
  • github-changes 1.1.2
  • husky 0.14.3
  • jest 22.4.3
  • lint-staged 7.0.0
  • prettier 1.11.1
  • react 16.2.0
  • react-dom 16.2.0
  • react-test-renderer 16.2.0
nvm
.nvmrc
  • node 9.8.0
travis
.travis.yml
  • node 9.8.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.