anypay / web3-checkout

2 stars 1 forks source link

Refactor useContext in components #117

Open alexeyandreevsky opened 11 months ago

alexeyandreevsky commented 11 months ago

Issue

Application use useContext for sharing state between components. It is considered bad practice and it is makes it hard to use component outside anypay, because it requires creating context, and this is not always possible. The better way would be to pass the state as the props in the component.

Possible solution

Replace all useContext calls with props handling.