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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert React+Redux template to use official Redux Toolkit package #16907

Closed
markerikson opened this issue Nov 7, 2019 · 24 comments
Closed

Convert React+Redux template to use official Redux Toolkit package #16907

markerikson opened this issue Nov 7, 2019 · 24 comments
Labels
affected-few This issue impacts only small number of customers area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-spa severity-nice-to-have This label is used by an internal tool
Milestone

Comments

@markerikson
Copy link

markerikson commented Nov 7, 2019

Hi, I'm a Redux maintainer.

The React+Redux template currently uses a "hand-written" approach for the Redux logic, such as this snippet:

https://github.com/aspnet/AspNetCore/blob/025476f31ee229b8e65e400d29c5606d992f023c/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/store/Counter.ts#L15-L48

We now have an official addon package called Redux Toolkit, which includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creating entire "slices" of state at once without writing an action types or action creators by hand.

It's now our recommended default approach for writing Redux logic.

RTK is already written in TypeScript, and you can see examples of using it with TS in the Advanced Tutorial docs page.

I'd like to see the template converted to use RTK instead of hand-written action creators and reducers.

Let me know if you have any questions!

@javiercn javiercn added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Nov 8, 2019
@javiercn
Copy link
Member

javiercn commented Nov 8, 2019

@markerikson thanks for contacting us.

@SteveSandersonMS do you have thoughts about this?

We will likely not tackle this ourselves for the time being, but if we agree that this is the right path, we might consider accepting a PR with the change/update.

@SteveSandersonMS
Copy link
Member

@markerikson Really glad you've got in touch! We've been coming to the realization that for these SPA framework templates, they would be much better maintained if they were owned not by the ASP.NET Core team but rather by representatives from each of the relevant SPA framework communities. The scenario you're giving here of Redux changing its recommendation to use the new RSK is a prime example of the reasoning - the small ASP.NET Core team can't respond to all these external changes as fast or as accurately as the Redux community could.

Rather than us significantly changing the existing template, we'd be more likely to offer support to the open-source community to build a new and better replacement, and then make that our official recommendation for ASP.NET Core developers to use.

Do you have any thoughts on anyone you know in the Redux world who would be interested in taking charge over an ASP.NET Core + Redux template? We'd be able to help them get started (e.g., with an initial project structure and info on how to publish), plus we have the resources to contribute PRs whenever the ASP.NET Core aspects of the template needs to be updated in the future. Do you think this is something the Redux team themselves would want to own, or is there any other person you would recommend?

cc @danroth27 (our PM for this)

@javiercn javiercn added this to the Discussions milestone Nov 8, 2019
@markerikson
Copy link
Author

The Redux core team is just @timdorr and myself, and we don't have the bandwidth to maintain various external templates (really quite similar to your own situation :) ).

But yeah, I can try publicizing the issue and see if anyone might want to help out.

@markerikson
Copy link
Author

Tweeted out that question:

https://twitter.com/acemarke/status/1192871279801577472

@markerikson
Copy link
Author

markerikson commented Apr 14, 2020

Hi, wanted to follow up on this.

I'd still really like to see any template code converted to use Redux Toolkit by default, as we now do in our official Redux templates for Create-React-App:

https://github.com/reduxjs/cra-template-redux

https://github.com/reduxjs/cra-template-redux-typescript

In fact, is there maybe some way to actually have ASP.net project setup use the CRA template automatically?

@markerikson markerikson changed the title Convert React+Redux template to use official Redux Starter Kit package Convert React+Redux template to use official Redux Toolkit package Apr 14, 2020
@SteveSandersonMS
Copy link
Member

cc @danroth27

@danroth27
Copy link
Member

Hi @markerikson. We are having various discussions about how to maintain the various ASP.NET Core SPA templates going forward. We certainly would like them to stay up to date with the latest best practices. We'll be digging deeper into how to achieve that for .NET 5. We're focused on other priorities right now, but we should be in a better place to engage on this issue in about a month (basically after the upcoming Microsoft BUILD conference).

@markerikson
Copy link
Author

Sure. Just ping me when you've got time to discuss this further.

@markerikson
Copy link
Author

Hey, just wanted to follow up on this. Any further thoughts?

@danroth27
Copy link
Member

Hi @markerikson. We've made some progress on deciding how we want to maintain the SPA templates going forward. We should have more details to share in the next few weeks.

@markerikson
Copy link
Author

bump

@javiercn javiercn added affected-few This issue impacts only small number of customers severity-nice-to-have This label is used by an internal tool enhancement This issue represents an ask for new feature or an enhancement to an existing one labels Oct 9, 2020 — with ASP.NET Core Issue Ranking
@ghost
Copy link

ghost commented Dec 8, 2020

Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.

This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue!

@ghost ghost closed this as completed Dec 8, 2020
@SteveSandersonMS
Copy link
Member

@markerikson Sorry that our bot has rudely closed this issue even though it was not addressed. I'm reopening it.

It's worth saying that, at this point, the team is working towards producing a bigger update in our SPA template strategy to make what we have more maintainable for the long term. So we most likely wouldn't attempt to do what this issue suggests in the short term, as the people working in this area are more focused on the bigger shape of the SPA template support.

@markerikson
Copy link
Author

haha, no worries :) I understand having other stuff to focus on. Please feel free to ping me whenever you do have some more concrete ideas to discuss!

@ghost
Copy link

ghost commented Feb 7, 2021

Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.

This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue!

@ghost ghost closed this as completed Feb 7, 2021
@markerikson
Copy link
Author

ping

Still interested in hearing updates on any plans here.

@danroth27 danroth27 reopened this Feb 7, 2021
@ghost
Copy link

ghost commented Apr 8, 2021

Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.

This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue!

@ghost ghost closed this as completed Apr 8, 2021
@SteveSandersonMS
Copy link
Member

@danroth27 Do you want to keep fighting the bot and reopen this again?

@danroth27 danroth27 reopened this Apr 8, 2021
@Meligy
Copy link

Meligy commented May 27, 2021

I heard there are many changes in the templates in .NET 6 (currently in preview). Anyone knows if this is part of them?

@Meligy
Copy link

Meligy commented May 27, 2021

I don't even see Redux anymore!

https://github.com/dotnet/aspnetcore/tree/main/src/ProjectTemplates/Web.Spa.ProjectTemplates/content

https://github.com/dotnet/aspnetcore/tree/main/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp

@ghost
Copy link

ghost commented Jul 27, 2021

Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.

This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue!

@ghost ghost closed this as completed Jul 27, 2021
@Meligy
Copy link

Meligy commented Jul 27, 2021

This ticket should not have been closed IMO. There was no response from Microsoft.

BTW, the SPA code has now moved to a submodule in another repository (which has no issue tracker, so this issue is still valid):

https://github.com/dotnet/spa-templates/

For React:

https://github.com/dotnet/spa-templates/tree/main/src/content/React-CSharp/ClientApp/

Still no Readux in there.

@javiercn
Copy link
Member

@Meligy We did announce that we are not continuing support for the react redux template moving forward.

You can read the announcement here

@Meligy
Copy link

Meligy commented Jul 28, 2021

Oh, sorry for missing this one. I guess this story can remain closed then :/

@ghost ghost locked as resolved and limited conversation to collaborators Aug 27, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-few This issue impacts only small number of customers area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-spa severity-nice-to-have This label is used by an internal tool
Projects
None yet
Development

No branches or pull requests

5 participants