CopyPastor

Detecting plagiarism made easy.

Score: 0.802593469619751; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2020-06-06
by CodeToJoy

Original Post

Original - Posted on 2015-10-05
by mpen



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Ok so I just found out what I was doing wrong haha. I need to have the content from my first map and the second map function encased in one View. Eg:
``` const display = Array.map(item => { return ( <View> <------------------------I didn't have these originally <View> <Text> {item.name} </Text> </View> {item.sports.map(item2 => { console.log(item2) return ( <View> <Text> {item2.sport} </Text> </View> ) })} </View> <------------------------I didn't have these originally ) })
If you're already using lodash, the [`_.times`](https://lodash.com/docs#times) function is handy.
import React, { Component } from 'react'; import Select from './Select'; import _ from 'lodash'; export default class App extends Component { render() { return ( <div className="container"> <ol> {_.times(3, i => <li key={i}> <Select onSelect={this.onSelect}> <option value="1">bacon</option> <option value="2">cheez</option> </Select> </li> )} </ol> </div> ); } }

        
Present in both answers; Present only in the new answer; Present only in the old answer;