Skip to content

Module/Codesplitting Issue with @angular-redux/form #46

Open
@maplion

Description

@maplion

I am currently using @angular-redux/form 9.0.1 and when I tried to modularize my application using a reducer registry, I was unable to avoid this error: Typeerror: cannot read property 'getstate' of undefined at rootstore._this.getstate (root-store.js:40) coming from @angular-redux/form when loading any component that had a form with [connect] that was inside of a lazy-loaded module.

I was able to make a workaround in the following form by removing the [connect] altogether and mimicking the behavior like this:

this.subscriptionToForm = this.form.valueChanges.subscribe(value => {
    this.myService.dispatchPayload('@@angular-redux/form/FORM_CHANGED', { path: myFormPath, value });
});

This seems to work fine and resolves my current issue, but I wanted to mention the issue as you move forward with development on these packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpkg: formRelated to the form package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions