Replies: 2 comments 9 replies
-
@dcallus I think, we should create an separate type-safe functional component ourselves, and link the original authors. As there is only one component, which manages the logic, we could split the functionality to be more robust. I can work on this particular implementation, if that may be hard to others. This way we can test it thoroughly, and not rely on their class component implementation. |
Beta Was this translation helpful? Give feedback.
-
Apparently useMemo is a fair amount slower than useState, especially on initial render, which may hint at why it is slow when changing. I've not had any issues with the rest of the app slowing down to be honest, so could be safe just to use useState as to be honest, the metronome must take priority over all else. I'll attempt to change it and see if it works. Note 100% if this is relevant, but thought it was worth noting: edit: nope. that wasn't the issue. |
Beta Was this translation helpful? Give feedback.
-
The original library doesn't look like it's going to be updated and even if it were, we need to have it modified for various issues.
We will be adding options for additional sounds, amongst other things, so it might be good to clean it up before we go any further.
I propose that we better integrate this part of the app, by
a) converting it to typescript.
b) not having it imported like a library, i.e. no source folder etc. This way we can move the tests out into the route src folder and get them up and running again.
I definitely think we should leave it state based though. It works perfectly and I don't see the need to convert to functional react. It may not be worth the effort. It may help keep things consistent if we do, but may be easier to add patches if the original library changes. It's kind of nice having it quite isolated and separate as it works so well, but inevitably it will become more integrated over time. I probably need some better folder structuring moving forward.
I'm particularly interested in your opinion chrisd1999 as you've worked a little in this part of the app.
2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions