ngrx / platform

Reactive State for Angular
https://ngrx.io
Other
8.01k stars 1.97k forks source link

PSA: Angular v18 and NgRx v18 #4352

Closed brandonroberts closed 3 months ago

brandonroberts commented 4 months ago

Which @ngrx/* package(s) are relevant/related to the feature request?

store

Information

For those looking to upgrade to NgRx v18 along with Angular v18, just wanted to post some general notes as we go through this each release cycle.

We're still working on getting the release out.

As this project is maintained by open source contributors in their free time, we try to work at a sustainable pace. You can support us by sponsoring the project or leveling up your team through one of our workshops.

We will have the release out as soon as its ready.

Thanks in advance,

The NgRx Team

Describe any alternatives/workarounds you're currently using

No response

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

jits commented 4 months ago

Thank you @brandonroberts — this should save many "not compatible with Angular v18!!!" queries.

Is there a list of the remaining bits that need doing for NgRx v18, to make it over the line? (Perhaps folks can help contribute to this progress).

brandonroberts commented 4 months ago

In the meanwhile you can use the following config in the package.json:

  "overrides": {
    "@ngrx/signals": {
      ".": "^17.2.0",
      "@angular/core": "^18.0.0"
    },
    "@ngrx/store-devtools": {
      ".": "^17.2.0",
      "@angular/core": "^18.0.0"
    }
  }

What is this?!

TIL 😅

pumano commented 4 months ago

would love to see support eslint flat config / eslint 9+ for @ngrx/eslint-plugin

timdeschryver commented 4 months ago

would love to see support eslint flat config / eslint 9+ for @ngrx/eslint-plugin

We're currently looking at angular-eslint to support this (https://github.com/angular-eslint/angular-eslint/issues/1755). I'd like to keep our version/config in sync with it.

friedhelm-youniverse commented 4 months ago

EsLint seem to be ready. https://github.com/angular-eslint/angular-eslint/releases/tag/v18.0.0

geforcemcdoodle commented 4 months ago

How is the solution ng add @ngrx/store@next to be valued?

pmathulan commented 3 months ago

I just installed it with ng add @ngrx/signals@18.0.0-beta.1

Yassinmoh commented 3 months ago

I use Angular 18 and this command solve my problem : ng add @ngrx/store@^18.0.0-beta.1 --no-minimal --force

remymoro commented 3 months ago

merci

brandonroberts commented 3 months ago

NgRx 18.0.0 has been published to npm on latest

https://dev.to/ngrx/announcing-ngrx-18-ngrx-signals-is-almost-stable-eslint-v9-support-new-logo-and-redesign-workshops-and-more-17n2

ilFortu commented 3 months ago

NgRx 18.0.0 has been published to npm on latest

https://dev.to/ngrx/announcing-ngrx-18-ngrx-signals-is-almost-stable-eslint-v9-support-new-logo-and-redesign-workshops-and-more-17n2

Hi @brandonroberts, On npm, I see as last version 18.0.0-rc.1 https://www.npmjs.com/package/@ngrx/signals?activeTab=versions

timdeschryver commented 3 months ago

@ilFortu see https://github.com/ngrx/platform/issues/4394

bttb commented 3 months ago

Since @ngrx/signals is still on 17.x.x, the command

ng add @ngrx/signals@latest

(taken from NgRx - installation) fails, even with the recommended overrides in package.json.

brandonroberts commented 3 months ago

Since @ngrx/signals is still on 17.x.x, the command

ng add @ngrx/signals@latest

(taken from NgRx - installation) fails, even with the recommended overrides in package.json.

As mentioned in the blog post, @ngrx/signals hasn't gotten its final 18.0.0 release yet, so ng add @ngrx/signals@next is still the recommended approach until then.

reduckted commented 3 months ago

@brandonroberts The confusion comes from the blog post saying that latest should be used:

To get started with @ngrx/signals, install the package via one of the commands below and follow the @ngrx/signals Guide.

npm install @ngrx/signals

You can also use the ng add command:

ng add @ngrx/signals@latest
brandonroberts commented 3 months ago

@brandonroberts The confusion comes from the blog post saying that latest should be used:

To get started with @ngrx/signals, install the package via one of the commands below and follow the @ngrx/signals Guide.

npm install @ngrx/signals

You can also use the ng add command:

ng add @ngrx/signals@latest

@brandonroberts The confusion comes from the blog post saying that latest should be used:

To get started with @ngrx/signals, install the package via one of the commands below and follow the @ngrx/signals Guide.

npm install @ngrx/signals

You can also use the ng add command:

ng add @ngrx/signals@latest

@reduckted I see. Later on the in the blog post if you're updating, its stated there. @timdeschryver will you update the ng add command?

timdeschryver commented 3 months ago

@brandonroberts it's updated.

msmallest commented 3 months ago

I was a bit confused seeing the blog post referenced, so for people reading this issue, I think this is it: https://dev.to/ngrx/announcing-ngrx-18-ngrx-signals-is-almost-stable-eslint-v9-support-new-logo-and-redesign-workshops-and-more-17n2

Relevant takeaway from this issue that is reflected in the article

# We're waiting to release @ngrx/signals@18.0.0 
# Currently, you can use release candidate with Angular 18 apps
ng add @ngrx/signals@next

Installing it now and very excited to try it out, thank you to the team for providing this workaround for the moment.