Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(bridge-ui): simplify components #13312

Closed
jscriptcoder opened this issue Mar 14, 2023 · 3 comments
Closed

refactor(bridge-ui): simplify components #13312

jscriptcoder opened this issue Mar 14, 2023 · 3 comments

Comments

@jscriptcoder
Copy link
Contributor

jscriptcoder commented Mar 14, 2023

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.

@jscriptcoder jscriptcoder converted this from a draft issue Mar 14, 2023
@jscriptcoder jscriptcoder self-assigned this Mar 14, 2023
@jscriptcoder jscriptcoder moved this from 📝 Todo to 🏗 In progress in Taiko Project Board Mar 16, 2023
@jscriptcoder jscriptcoder changed the title chore(bridge-ui): simplify components refactor(bridge-ui): simplify components Mar 31, 2023
@dionysuzx
Copy link
Collaborator

@jscriptcoder can we close this issue now?

@jscriptcoder
Copy link
Contributor Author

Yes, we can close this ticket... Closing it.

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Taiko Project Board Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants