Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling the function requires a slightly different implementation. #140

Open
dylannirvana opened this issue Jan 13, 2019 · 1 comment
Open

Comments

@dylannirvana
Copy link

The pattern I am using is different. I am holding the array object in state. Close, but I am not sure how exactly to do this.

            return  this.state.data.length > 1 
               ? this.state.data.map((item) => (
                   <Card key={item.sku} >
                        <CardImg src={item.image} />
                        <CardTitle> {item.sku} </CardTitle>
                        <CardBody> {item.name} </CardBody>
                        </Card>
               )) 
               : null         
        }

And I am using it by calling the function (not a parameter).

                                <Row className="grid" > {this.renderData()} </Row> 
                        </Container>```
@afram
Copy link
Collaborator

afram commented Jun 20, 2019

I'm not sure what your question is sorry. Can you provide more context please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants