You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are components with a lot of logic, such as App.svelte, BridgeForm.svelte, Transaction.svelte... making them complex and difficult to read, debug and therefore maintain, more pone to errors and scalability issues. By keeping them simple, small and well commented we improve readability and understanding, we make them more maintainable, easing also the onboarding of new developers. We might want to extract most of this logic out of the component making them slimmer and also easier to unit test.
Another idea would be to re think the use of store variables, and use them as less as possible, only where it's really necessary for example when they're shared in multiple components or to avoid prop-drilling. But otherwise use more props or simply local state. This also simplifies the code the logic. And example of this is with wagmiClient or bridges, where they are initialized in App.svelte, but only used in one another component. We could make use of Context API instead since stores are used to manage state.
The text was updated successfully, but these errors were encountered:
There are components with a lot of logic, such as
App.svelte
,BridgeForm.svelte
,Transaction.svelte
... making them complex and difficult to read, debug and therefore maintain, more pone to errors and scalability issues. By keeping them simple, small and well commented we improve readability and understanding, we make them more maintainable, easing also the onboarding of new developers. We might want to extract most of this logic out of the component making them slimmer and also easier to unit test.Another idea would be to re think the use of store variables, and use them as less as possible, only where it's really necessary for example when they're shared in multiple components or to avoid prop-drilling. But otherwise use more props or simply local state. This also simplifies the code the logic. And example of this is with
wagmiClient
orbridges
, where they are initialized inApp.svelte
, but only used in one another component. We could make use of Context API instead since stores are used to manage state.The text was updated successfully, but these errors were encountered: