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

Patcher bg music #100

Closed
wants to merge 9 commits into from
Closed

Conversation

billyvg
Copy link

@billyvg billyvg commented Mar 19, 2017

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 in widgets) 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?

billyvg added 8 commits March 18, 2017 08:29
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.
@billyvg
Copy link
Author

billyvg commented Mar 19, 2017

Ugh just realized I must have had an old copy of master, will fix the conflicts.

*/

import * as React from 'react';
interface AudioProps extends React.HTMLProps<HTMLAudioElement> {
Copy link
Member

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);
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants