Skip to content

Accidentally isolating DOM source #1

Description

@b123400

When isolating form like this:

import { isolate } from 'cyclic-form';

isolate(stateLens)(Form)({
  DOM,
  state,
});

It seems Cycle.js automatically assumes all unspecified sources should be isolated with a default scope, which means the above code is equivalent to

import isolate from '@cycle/isolate';

isolate(Form, { state: stateLens, DOM: 'cycle1' /* the default scope name */ })({
  DOM,
  state,
})

This behaviour breaks the submit button because it cannot interfere with form's `submit event.
Something like this is needed, but the current API isn't possible:

import isolate from '@cycle/isolate';

isolate(Form, { state: stateLens, DOM: null /* explicitly prevent isolation */ })({
  DOM,
  state,
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions