DEV Community

Abdul Samad
Abdul Samad

Posted on

Get JSON Data from API Call and pass it to component as a parameter

I have a URL that I am returning Json data, that is need to pass as a parameter to react component, that component is: https://rsuitejs.com/components/multi-cascader

and here is my code:

fetch('http://ABCServer/LabMag/Home/GetCategories')
.then(response => response.json())
.then(json => console.log(json));

ReactDOM.render(



Cascade:








Not cascaded:





, document.getElementById('root'));

Top comments (0)

πŸ‘‹ Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay