-
Notifications
You must be signed in to change notification settings - Fork 12
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
Real time map #299
Real time map #299
Conversation
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.
Did you check if your implementation works?
On my local computer it didn't.
unsubscribe = await listenToChildStatements(dispatch, statement.statementId, (childStatements) => { | ||
setSubStatements(childStatements); | ||
|
||
const topResult = sortStatementsByHirarrchy([ | ||
statement, | ||
...childStatements.filter((state) => isOptionFn(state) || state.statementType === StatementType.question), | ||
])[0]; | ||
|
||
setResults(topResult); |
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.
Create the callback function outside of the listenToChildStatements props to improve readability.
No it doesn't work properly yet, I've asked for Tal's advice in what should i do in order for it to work. The problem is that when we add a new statement only the new statement is added in real time, the whole map is somehow missing and only on second rendering we get the expected result like before. |
Lets talk about it today |
Real time map changes (still not finished)