-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Roadmap to React-Admin 3.0 #3194
Comments
I think it would be better to migrate to |
@zahidraza can you elaborate ? |
Author of redux-form recommends not using redux-form if someone is just getting started.Here is excerpt from redux-from:
This blog explains the reason behind his decision. So, since you are rewriting, I thought it would be better to migrate to react-final-form |
What about using Formik instead and ditching all the saga stuff? |
What saga stuff? Why should we use formik instead of other solutions? Please share your analysis of the pros and cons of the current solution vs your proposal. |
Saga stuff: https://github.com/marmelab/react-admin/blob/master/packages/ra-core/package.json#L67 Comparison: People using saga say it's easy to write unit tests. It looks to me like maybe that's true, but it seems to come as a trade off of readable, maintainable code. It's not necessarily that the library's goals are bad, but using generators to implement it seems pretty gratuitous. |
We don't use sagas for forms, but for handling side effects (like HTTP requests etc). Formik wouldn't replace them. As for using Formik vs redux-form or react-final-form, your analysis is a bit short. |
Look. Not my project. Do whatever you want, there's no need for that kind of tone. What about using Formik instead? You don't seem to care. Fair enough. If you don't care to do the analysis on why it's being used and its design principles, that's your call. It was just a question. and ditching all the sage stuff? I think using generators the way saga does is gross and results in complex back-assward code to read. You may not. That would be fair too, if you answered my question instead of getting snippy and aborting because I didn't spoon feed you Formix info. |
@hcldan I understood that you wanted to use Formik because that would help remove sagas. Now I understand that you proposed 2 different changes. Now about formik, I do care, that's why I'm asking you your pros and cons. You brought the subject here, not me. When we choose a library we try to base our choice on more than other people's opinions, and that includes objective facts, past experiences, known caveats, etc. See #3246 as a way to structure your argumentation. As for sagas, if you don't like them, what do you suggest we replace them with? They provide a much necessary feature (handling side effects). Lastly, I don't have the impression that I used a bad tone. I'm asking you for more than opinions. Please drink the kool-aid or you'll be banned from this repo, no other warning. |
Are you considering Typescript for this new release? |
btw, just curious - why did you choose typescript over flow? Flow seems like a more natural choice for react |
The TypeScript migration has started 6 months ago (see the language composition in the GitHub header). The ra-core package is already migrated, the rest will happen progressively - and the 3.0 release isn’t constrained by the completion of the migration. As for the typescript vs flow question, let’s say that there is no consensus and that we had to make a choice. We consider, contrary to you, that TypesScript is the more natural choice (see e.g. material ui). |
Can we export react-admin.d.ts file, regardless of the fact that not all components have been covered with types? I think even partial type-safety is better than no type-safety. |
Unfortunately, no. That's a limit of TypeScript (see microsoft/TypeScript#7546) |
We could add one ourselves right ? |
Yes, but we’d have to write it by hand. |
I've made one for myself with help of |
Excited for the new release. 🎉Particularly the upgrade to hooks. I was wondering if you are planning any production ready starter or a boilerplate for This boilerplate also uses |
No, we won't create a bootstrap as it's as easy as installing create-react-app then the react-admin package. |
Good day. I have an idea. Rather, the need. When developing an application that uses field access, its own implementation becomes very cumbersome (each field of each form must be wrapped in a function that, if there is access, the component will draw, otherwise null).
This is very helpful when using third-party access control libraries. |
You can already use the WithPermissions component for that, and we'll make a hook for the same use case to make it easier. I think it'll solve your use case. Also, you can already implement the syntax you describe in userland by creating a custom Form component. |
Thanks for the suggestion. I use WithPermissions. This led to such a need. The code in the user components of the form becomes several times larger, only in order to implement such simple logic. Of course, you can leave it as it is, and everything will work. I am just for convenience and good readability in projects. |
I agree with @zahidraza that redux-form should be replaced with react-final-form.
As stated here: https://codeburst.io/final-form-the-road-to-the-checkered-flag-cd9b75c25fe, which refers to here: reduxjs/redux#1287 (comment) I agree with this. A form should be mounted an unmounted with all it's data.
Though it's not a really important change, so I totally understand if you say, that it should not be done |
Idea for improvement. All Inputs use the parameter helperText={touched && error}. This leads to a situation where you need to install a custom helperText, but this deprives the error message and the user does not understand what happened. Offer:
What do you think about it? |
To discuss individual improvements, please open a new issue, otherwise this thread will become impossible to follow. |
Can someone on the team provide some information for us? |
@mehrdad-shokri We'll publish an alpha release when we consider the API is stable enough. Until then, we don't recommend that you use the
|
@fzaninotto how about the second part of my question? Can you guide me on that too? |
No, |
@fzaninotto so with your descriptions I'm blocked. My boilerplate is based on |
Sorry, I can't help you, please use stackoverflow for support. |
It's not a technical question to ask on SO. My question was related to the roadmap of this project |
@mehdad-shokri you can by now use mui v3.x.x with the actual 2.x react-admin until the v3 is released. There is a hack published on the net on how you can do it. |
I've just published react-admin@3.0.0-alpha.0. Not yet ready for production, but if you're feelling adventurous, we need your feedback! |
Thank you very much. @fzaninotto! I tried a fresh install, but got this error: Do you know what is happening here? |
Thanks for react-admin ! |
@paaacman when it's done. |
I've just published react-admin 3.0.0-alpha.1. There should not be any more problems at installation. https://github.com/marmelab/react-admin/releases/tag/v3.0.0-alpha.1 |
Not sure if this is intentional but ra-language-french is stuck at version alpha.0. |
Yes, there was nothing new in this package so Lerna didn't republish it. |
@fzaninotto I tried the following and able to start the demo without any issues.
Please confirm if I'm missing anything? Because from an UI perspective I was unable to find out much difference in the demo app other than I felt bit slow to start with. Also, please let me know if any particular test case to be tested in the demo app. |
@dgkm You've cloned the master branch, which is the 2.x branch. To install the 3.0, use npm and install As for the feedback we're waiting, more than regressions you may notice in the demo, we'd love to hear about difficulties you have when upgrading an existing app, or the usability of the new APIs (mostly hooks). Concerning performance, we haven't done any profiling on the 3.0.0 branch yet, so it may be slower than the 2.x branch. We'll do an optimization pass before releasing the stable version. |
In fact I checked out the alpha.1 with Sure, I will try upgrading the existing project installing
|
I'm getting the following error on startup after the upgrade without changing anything other than react-admin package:
at line Any thoughts? |
@dgkm There is an upgrade guide at the repository root. Try following it ? |
Hi, I'm asking here since it doesn't deserve its own issue. |
Hi. Please fix FileInput problem in version 2.9.4. it accepts nothing. There is already an issue for this problem. |
I locked this issue as many people use it to ask unrelated questions or howto questions which should be asked on Stackoverflow. Please read the contributing guide. |
We've finally ticked all the boxes: react-admin v3 is out in beta. We'll now focus on fixing bugs and improving performance and documentation, and we hope to publish a stable v3 within a few weeks. New features will have to wait until 3.1, and new breaking changes will have to wait until 4.0 (which is not even scheduled). |
React-admin v3 was released yesterday! |
React-admin v2 is about one year old. We've kept backward compatibility for a year, but it means we can't yet use all the new shiny tools that our dependencies have shipped since then in major releases.
The objectives of the next release, v3, are to:
react
andreact-dom
to 16.8 to use Hooks ([RFR] Upgrade dependencies #3170)material-ui
to 4.2.1 (instead of 1.5) to use... a lot of things, uncluding theuseStyle
hook ([RFR] Upgrade material-ui to v4 #3191)react-redux
to 7.1.0 (instead of 5.0) to useuseDispatch
anduseSelector
hooks instead ofconnect
([RFR] Upgrade dependencies #3170)redux-saga
to 1.0 (because we're on a non-supported version) ([RFR] Upgrade redux saga #3212)redux-form
toreact-final-form
([BC Break] Migrate from redux-form to react-final-form #3455)fetch
,accumulate
,undo
andcallback
sagas by data hooks for fetching thedataProvider
(useQuery
,useMutation
,useDataProvider
) ([RFR] Data hooks #3181)auth
saga by auth hooks (useAuth
,usePermissions
) ([RFR] Add auth hooks #3368)i18n
saga by i18n hooks (useTranslate
,useLocale
,useSeltLocale
) ([RFR] Add useTranslate hook #3188, [RFR] Refactor I18n layer to use hooks #3672, [RFR] I18n provider new signature #3685))notification
,redirect
, andrefresh
sagas by hooks (useNotify
,useRedirect
,useRefresh
) ([RFR] Declare fetch side effects as function #3425)useMediaQuery
hook to replace the Responsive component ([RFR] Migrate Responsive to custom media queries #3329)authProvider
([RFR] Add missing translation in NullableBooleanInput #3614)i18nProvider
([RFR] Replace I18nProvider function by object #3699)dataProvider
([RFR] Convert DataProvider to Object #3726)isLoading
toloading
everywhere ([RFR] Rename isLoading to loading everywhere #3644)crudXXX
actions and thefetch
sagaAutocompleteInput
andAutocompleteArrayInput
usingdownshift
([RFR] New AutocompleteInput using Downshift #3031, [RFR] New AutocompleteArrayInput #3667)connected-react-router
or not (because it's not active)This will lead to a deep transformation of the library. We hope to minimize the breaking changes, but developers will have to follow a migration guide to use this new version with existing code. We'll try to make that as painless as possible.
We'll need help from volunteers to test the changes before releasing a stable version. We'll publish alpha and beta releases for that purpose.
We expect the 3.0 to be released sometime in the Summer of 2019. Development has already started and is visible on the
next
branch. We tag related pull request with the 3.0 milestone so you can track our progress.Comments are welcome. Help migrating class components to functional components using hooks is also welcome (although we don't have the objective of migrating all the codebase to functional components for 3.0. This can happen later).
The text was updated successfully, but these errors were encountered: