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

Allow Action Definitions to be called as functions. #7

Merged
merged 3 commits into from Feb 6, 2018

Conversation

crazytoucan
Copy link
Contributor

@crazytoucan crazytoucan commented Feb 6, 2018

This PR improves ergonomics for Definition.create():

const SetVisible = TypedAction.create("app::set_visible")<{
  item: string;
}>();

// old way
dispatch(SetVisible.create({ item: "hello-redoodle" }));

// new way
dispatch(SetVisible({ item: "hello-redoodle" }));

@crazytoucan crazytoucan changed the title Actions callable function Allow Action Definitions to be called as functions. Feb 6, 2018
@crazytoucan crazytoucan merged commit 01fea89 into master Feb 6, 2018
@crazytoucan crazytoucan deleted the actions-callable-function branch February 6, 2018 19:25
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.

None yet

1 participant