-
Notifications
You must be signed in to change notification settings - Fork 110
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
Question: A user edit form initial state #47
Comments
Just trying to 'pay it forward' as MrWolfZ has been very helpful to me.
|
Thanks for the reply. Seems reasonable. With 3, it would be a real-time update from a websocket or something that would update the user in question in the list of users state. As soon as this happens, the content in the form is out of date. I figured being a reactive store there might be a commonly used pattern in this situation. The situation that comes to mind is if the user has several addresses, ie an array, someone else editing the user at the same time could completely rewrite a painfully entered bunch of addresses. Thoughts? Is is a separate backend related issue? But yeah most of that makes sense to me. I'll give it a go, cheers |
I had to deal with similar issues in the applications I am working on. I'll provide proper feedback on your questions once I am home from work.
|
Alright, finally found some time. For most of the questions the answer is "it depends". Since I don't know your exact use case its difficult to provide concrete others. Therefore, I'll try to provide you with options and point out some of the trade-offs.
I hope this answers your questions. |
Really appreciate the time you've taken to help me here. Has really helped! Thanks so much |
Hi, just discovered this repo today and I like it. I am considering using it as it looks quite beneficial.
Just after a bit of guidance here. I would be creating a user edit form (after selecting a user from a list) and have the following questions about how I would do that here:
selectedUser: User
? That will need to be cleared/reset/updated when another user is selected.selectedUser
, wouldn't other components now display unsaved data? Seems wrong - as I would expect to update that state only after successfully updating the user. Need both aselectedUser
and aselectedUserForm
?Hopefully my questions are clear and that someone can help fill in my quirky knowledge gaps. Thanks
The text was updated successfully, but these errors were encountered: