In the child component, we want to map through the list of items we have and output each item as a separate entity. Inside the root container we can see we have our contents directly. Table of Contents: createFragmentContainer. A container does not directly fetch data, but instead declares a specification of the data needed for rendering, and then Relay will guarantee that this data is available before rendering occurs. For example, let’s say we want to pass a list of items as props from a parent component to a child component. A Fragment Container is a higher-order component that allows components to specify their data requirements. When mapping a list of items, you still need to make use of keys the same way as before.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |