Skip to content

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

Description

@shengmin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions