144
rated 0 times
[
146]
[
2]
/ answers: 1 / hits: 26855
/ 7 Years ago, fri, february 10, 2017, 12:00:00
Why isn't my component rendering?
import React, { Component } from 'react';
import {Chokers, Bracelets, FRings, MRings} from './AllItems.js'
class App extends Component {
handleClick(e){
<Chokers chokers={this.props.items.Chokers}/>
}
render() {
return (
<div className=App>
<ul style={{display: 'inline'}}>
<li onClick={this.handleClick.bind(this)}>Chokers</li>
<li><a href=></a><Bracelets bracelets={this.props.items.Bracelets}/>Bracelets</li>
<li><FRings frings={this.props.items.FRings}/>Rings for Women</li>
<li><MRings mrings={this.props.items.MRings}/>Rings for Men</li>
</ul>
</div>
);
}
}
export default App;
Basically my this.props.items.Chokers for examples call a on my json file that was passed through.
I just want to create a links to another component at an onClick event.
The problem that I am having is that my Component under handleClick doesnt render.
More From » reactjs