Skip to content

Conversation

@sergeysova
Copy link
Member

  • Flatten config of unit not inside initUnit
  • Start implementation of the {domain} in create* methods
  • Refactor naming in createDomain
  • Call domain hooks if domain passed as config argument

Closes #590

Conventions

@sergeysova sergeysova changed the title Flatten config of unit not inside initUnit Allow to pass domain as an argument for createEvent and similar methods Aug 18, 2022
@sergeysova sergeysova marked this pull request as ready for review August 18, 2022 16:52
@sergeysova sergeysova self-assigned this Aug 18, 2022
@sergeysova sergeysova added the enhancement New feature or request label Aug 18, 2022
@sergeysova sergeysova added this to the effector 23.0.0 milestone Aug 18, 2022
Copy link
Member

@AlexandrHoroshih AlexandrHoroshih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👍

}).toThrowErrorMatchingInlineSnapshot(
`"Domain cannot be created with two domains as parent. Please, remove {domain} argument."`,
)
// @ts-expect-error There is no types for case, just runtime check
Copy link
Member

@AlexandrHoroshih AlexandrHoroshih Aug 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably the other way around 🤔
there is no runtime check for the case, only typecheck

Copy link
Member

@igorkamyshev igorkamyshev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zerobias zerobias removed this from the effector 23.0.0 milestone Aug 20, 2022
Copy link
Member

@zerobias zerobias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks 👍👍 This will go to next minor release as this is not a breaking change and there is a need to publish some features earlier

@zerobias zerobias merged commit 97e7c37 into master Aug 20, 2022
@zerobias zerobias deleted the feat/allow-to-pass-domain-to-config branch August 20, 2022 16:15
sergeysova added a commit that referenced this pull request Jun 10, 2023
iposokhin pushed a commit to iposokhin/effector-forms that referenced this pull request Dec 10, 2023
Since effector v22.4.0 we can pass a domain as an argument to units factories. This allows us to get rid of the createFormUnits factory and make units creation easier. See more details effector/effector#763
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework domain-related APIs

5 participants