-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
538 no double votes #546
538 no double votes #546
Conversation
@@ -417,6 +417,68 @@ export default function ChatRoom (props) { | |||
messageListRef.current?.data.map((item) => post.id === item.id || (post.localId && post.localId === item.localId) ? newPost : item) | |||
}, [group?.id]) | |||
|
|||
const onAddProposalVote = useCallback(({ post, optionId }) => { |
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.
this is great for now, but im realizing this is a lot of stuff we have to do for every single action that could update a post card in the chat stream. there are more and there will be more i think. so im wondering if we can generalize this and just have a function that takes the optimistically updated post data in the redux store and does a general replace of the whole post data in the chats with that 🤔 just a pondering for the future
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.
If there is an URQL conversion in the future for Web, I think you'll find that all of this will be handle implicitly as a function of graph cache.
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.
Yeah, this was inspired me checking about tracks/actions going into the chat...
It'll get out of hand real fast.
As Loren said, might be good justification to push for urql here sooner rather than later
Closes #538