How to pass and save Provider from Component to Parent.js

hi,
when passing Provider object from Component to Index.js and saving it using useState, I get endless loop of Component re-render.

What I am trying to achieve is to save Provider object on Index.js after logging in so that I get use it for sending transactions from Index.js page.

Any help is welcome, thanks

I am using nexjjs/web3 example from Integration builder and trying to adjust it as described above.

@tweetbooster8888 Thanks for your patience.

Your request has been submitted to our team. We will get back with further updates once more information becomes available.

You don’t need to save the provider object, web3auth instance upon login can return the provider by web3auth.provider. You can have a look at our nextJs examples in order to understand how we handle it using state.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.