Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • Why do you have to start from the beginning? You sure keep an array or map of data you render to html. Can't you sort that? Commented Feb 19, 2019 at 9:32
  • Welcome to SO. Please see. Also, probably all you need is sorting the state and show this to the user as @MoritzRoessler suggested.
    – devserkan
    Commented Feb 19, 2019 at 9:33
  • this is Front-End Application, with users that can login the website and admin that can change the content of the vacations (update happens with Socket.io), i already applied the update in real-time (of the Vacations) for the user that logged in - on the Main Vacations array which i took from the Database. like i said - each vacation has checkbox - the user can follow it , and followed vacation must be shown first
    – Àtishking
    Commented Feb 19, 2019 at 9:51
  • Ok, so don't you have a state on that application? You can track the checked or followed items and sort your data, then render it according to an update. Without seeing any code (actually working a minimal code) all we can do here is giving blind suggestions.
    – devserkan
    Commented Feb 19, 2019 at 9:55
  • check out the edited code
    – Àtishking
    Commented Feb 19, 2019 at 10:01