-
Notifications
You must be signed in to change notification settings - Fork 51
feat: field to assign a member to a task #756
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
feat: field to assign a member to a task #756
Conversation
# Conflicts: # src/components/ChallengeEditor/ChallengeView/index.js # src/components/ChallengeEditor/index.js
When switching from "view" to "edit".
Looks good to me. Will merge it to develop to test out feature in dev.
What exact React construct you are referring here @maxceem? Could you please point me the docs, if it is something new feature that has recently enabled in latest react as you suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxceem can you please share a quick pros and cons list for making the SelectUserAutocomplete self sufficient instead of using the redux actions.
In the recent version of At the moment, to get member details, we have to pass function SomeComponentDeepInside() {
// we create custom hook `useMemberDetails` that will take details about the user with id `123456`
// from ReduxStore and put it into `memberDetails`
// so we can just use them inside this component
// if member details are not loaded yet, `useMemberDetails` would trigger loading of user details,
// and would update `memberDetails` as soon as details are loaded
const memberDetails = useMemberDetails(123456)
}
The new version of |
Pros (not using Redux)
Cons (not using Redux)
TLDR for small local states it makes sense not to use Redux Store and keep data in Redux only for main global things like pages. |
Interesting. Thanks for sharing, didn't know it.
Thanks for sharing it as well. I was having the same concept in my mind. |
react-select
.loadMemberDetails
can be used to load details about any user byuserId
. It stores data in Redux Storemembers
path. So this functionality could be reused to show handle for any other user byuserId
.members
from the store everywhere where we need user details, but I guess we would have to update React16.7
to16.8.3+
together withreact-redux
from6
till7.1+
for this.