score:4

Accepted answer

you are not assigning the click handler to your component it should look like this :

class imageitem extends component {
    render() {
        return (
            <a href="#" onclick={this.props.onclick}>
                <img
                    classname="portfolio-image"
                    src={this.props.image}
                    alt={this.props.title}
                />
            </a>
        );
    }
}

export default imageitem;

Related Query

More Query from same tag