I need to make a simple GET request with mobx using functional components using fetch to server with this API https://jservice.io/api/category?id=150 Get data and then display it in my user interface component.
I spent several hours looking for a similar example but couldn't find it, please if you have a similar example or if you could demonstrate online editors how it works I would really appreciate it.
You could create a local component
observablewithuseLocalObservable, and use auseEffectto fetch the data when the component is mounted and put that in theobservable, and then finally render it.Example