Skip to content
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

fix : #216 Mark as complete button UI sync #221

Closed
wants to merge 3 commits into from
Closed

fix : #216 Mark as complete button UI sync #221

wants to merge 3 commits into from

Conversation

Maawan
Copy link
Contributor

@Maawan Maawan commented Mar 14, 2024

Hi @hkirat , to solve this issue I observed that whenever a user is changing content then the sidebar reload data from backend and the checkbox is checked according to completed or not but the problem is only when a user is on the same page and tried to check or click on markascompleted then it could not see the changes in the sidebar and the main content screen accordingly. If sidebar again reloads the data then it will show the correct checked status.

My Approach
I created a atom for this, if any user is changing checkbox then this atom will hold its value and will reflect on the right side and vice versa. As user changes content page, sidebar again gets data from backend and the role of atom is complete.

I am just a beginner, please suggest for the improvement required

@Maawan Maawan closed this Mar 14, 2024
@devsargam
Copy link
Collaborator

Bhaii use optimistic updates

@Maawan
Copy link
Contributor Author

Maawan commented Mar 14, 2024

@devsargam I tried to do it that way but didn't got the solution show sidebar's re-render will be triggered. for re-rendering states are the best things so I tried with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants