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

[rcw] Proposal to add a 2nd optional parameter to mutate #48

Open
shengmin opened this issue Jul 28, 2018 · 0 comments
Open

[rcw] Proposal to add a 2nd optional parameter to mutate #48

shengmin opened this issue Jul 28, 2018 · 0 comments

Comments

@shengmin
Copy link
Contributor

Just to continue our discussion around adding a 2nd optional parameter to mutate to pass additional information/options that might be needed by different 'plugins' (eg. devtools). I'm proposing the following (basically allow each plugin to reserve one slot in the option object):

type Option = {
  // ... core options
  // plugin options
  pluginA?: {
     isDevMode: boolean,
  },
  pluginB?: {
    mutationName: string,
  },
};

// Could also use Symbol to reserve the slot when flow supports it
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

No branches or pull requests

1 participant