Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- renderLogic() {
- let items = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14];
- return items.map((item) => {
- if(items > 5) {
- return (
- <div key = {item} style={{float: 'left'}}>
- {item}
- </div>
- );
- } else {
- return (
- <div key = {item}>
- {item}
- </div>
- );
- }
- });
- }
- render() {
- return (
- <div className="sample-container">
- {this.renderLogic()}
- </div>
- );
- }
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 1 6 11
- 2 7 12
- 3 8 13
- 4 9 14
- 5 10
Add Comment
Please, Sign In to add comment