Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摎[DOCS]: ZooState imported before it exists #2041

Open
peterhippocarter opened this issue Aug 8, 2023 · 1 comment
Open

馃摎[DOCS]: ZooState imported before it exists #2041

peterhippocarter opened this issue Aug 8, 2023 · 1 comment

Comments

@peterhippocarter
Copy link

peterhippocarter commented Aug 8, 2023

Description

On the installation page of the documentation, immediately after the npm install/yarn add step, the user is instructed to import the NgxsModule like so:

import { NgModule } from '@angular/core';
import { NgxsModule } from '@ngxs/store';

import { ZooState } from './examples/zoo.state';

@NgModule({
  imports: [
    NgxsModule.forRoot([ZooState], {
      developmentMode: !environment.production
    })
  ]
})
export class AppModule {}

Since the user has not been given details on how to create ZooState yet they will be unable to import NgxsModule in the manner specified.

馃敩 Minimal Reproduction

Read the docs 馃槢 馃槈.

Expected vs Actual Behavior

It would be nice to be able to follow the installation instructions from start to finish and not have to skip ahead and make inferences to get it to work.

In a sense the coach 馃殞 has been put before the horses 馃帬. Or, perhaps the giraffe 馃 before the zoo 馃帾.

@peterhippocarter
Copy link
Author

Closely connected: !environment.production doesn't actually exist by default in newer versions of Angular (alas), so this part won't work either.

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

No branches or pull requests

1 participant