In a React app, I need to work with JSON-RPC API. I found some libraries that act as a JSON-RPC client. But it's not entirely clear to me whether I should install with a special client. I tried sending a request using axios and it looks like everything is working. Or am I missing something?
Therefore, I will be grateful if you answer at least one of my questions:
Сan use the
fetchoraxiosto send and receive data in json-rtc format?axios.post(`/link-to-rpc-api`, { "jsonrpc": '2.0', "method": 'transformMessage', "id": 1, "params": { "message": 'Test', } });If so, how can I execute batch requests?
Are there any best practices/libraries for json-rpc to work in a React app?
Thanks a lot!