hzdg / react-imageloader

A React component for wrangling image loading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not support any events

Volodymyr128 opened this issue · comments

You can't pass smth like onClick handler, which means you need to wrap ImageLoader element. Which is too complex/ugly for sucjh simple task

@Volodymyr128 yes you can.

Example - Click Handler

React.createClass({
  render() {
    let imgProps = {
      onClick : function() { 
        console.log("lulz"); 
      }
    };

    return (
      <ImageLoader 
        src      = "catlulz.gif"
        imgProps = {imgProps}
      />
    );
  }
})

Thanks!!