-
Notifications
You must be signed in to change notification settings - Fork 25
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
Patcher bg music #100
Patcher bg music #100
Conversation
This was throwing ts compilation errors - not able to delete readonly properties. Use es6 object destructuring instead.
`componentDidUnMount` should be `componentWillUnmount`
Since music is stateful (vs a sound that is played once), I used redux to handle playing music.
Ugh just realized I must have had an old copy of |
*/ | ||
|
||
import * as React from 'react'; | ||
interface AudioProps extends React.HTMLProps<HTMLAudioElement> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface needs to be exported as well here
@@ -268,4 +274,4 @@ class PatchButton extends React.Component<PatchButtonProps, PatchButtonState> { | |||
} | |||
} | |||
|
|||
export default PatchButton; | |||
export default connect()(PatchButton); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this connect? The component should not be wrapping in a connect call, if you just want dispatch in the component accept the function as a prop.
For #99
Note this isn't ready yet, just wanted some feedback for a few things.
I'm using redux actions to handle playing music since it's more stateful than sounds. The first point in the issue is fully working. However it looks like
Controller
(and the other components inwidgets) are using a different store than the
patcher`. This means we can't dispatch actions across these components. What's the reason they're all using different stores?