Skip to content

provideState cannot be used in standalone components #4234

@wshager

Description

@wshager

Which @ngrx/* package(s) are the source of the bug?

store

Minimal reproduction of the bug/regression with instructions

@Component({
  // ...
  providers: [provideState({})]
})
// ...

Typescript compilation error: Type 'EnvironmentProviders' is not assignable to type 'Provider'

Expected behavior

No compilation error

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)

Ngrx: 15.3, Angular: 15.2.9, Node: 20.2

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

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