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)

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay