Skip to content

Svelte integration #1324

Jul 22, 2020 · 2 comments · 10 replies
Discussion options

You must be logged in to vote

Awesome, looking forward to it!

Options are merged in, but it's done within machine.withConfig(...):

  public withConfig(
    options: Partial<MachineOptions<TContext, TEvent>>,
    context: TContext | undefined = this.context
  ): StateNode<TContext, TStateSchema, TEvent, TTypestate> {
    const { actions, activities, guards, services, delays } = this.options;

    return new StateNode(
      this.config,
      {
        actions: { ...actions, ...options.actions },
        activities: { ...activities, ...options.activities },
        guards: { ...guards, ...options.guards },
        services: { ...services, ...options.services },
        delays: { ...delays, ...options.delays }
      },

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
9 replies
@Andarist
Comment options

@jamesopstad
Comment options

@davidkpiano
Comment options

@davidkpiano
Comment options

@Andarist
Comment options

Answer selected by jamesopstad
Comment options

You must be logged in to vote
1 reply
@jamesopstad
Comment options

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