spring-guides / getting-started-guides

Getting Started Guide template :: The template for new guides and also the place to request them.
https://github.com/spring-guides/getting-started-guides/wiki
Apache License 2.0
518 stars 204 forks source link

How to fetch one to many records in rest+react app? #158

Closed roykyle8 closed 1 year ago

roykyle8 commented 1 year ago

Rest+React app gets the managers association data inline as the ManagerRepository is not exported. But how about have a relations eg. employee .* address where AddressRepository is exported. How can we fetch the employee address and show it on the react component?

roykyle8 commented 1 year ago

I found the solution. We can create the child component and sent the resource url as a prop which can be loaded inside the component.