At first, Harry would probably be in shock. He has always considered Hermione one of his closest friends, so her betrayal would be a huge blow. He might not believe it at first and try to reason with her.
Harry might react with shock. If he overhears something unexpected like Ron and Hermione confessing their love for each other, it would be a big surprise. He might stand there frozen for a moment, not knowing how to process it.
Ron would be devastated. He's been their best friend for years. He'd probably try to talk them out of it at first. If that fails, he might have to choose between loyalty to his friends and what he believes is right. The Hogwarts professors, like Dumbledore (if he were still alive in the fanfiction), would be very concerned. Dumbledore would likely see it as a great loss of two of the brightest lights in the wizarding world. He might try to find a way to reverse whatever led them down this dark path.
Ron could also be really happy for them. In certain fanfic scenarios, he might have noticed the chemistry between Hermione and Harry all along. So when Hermione asks Harry out, he's like the biggest cheerleader. He might offer to cover for them when they go on dates or give Harry advice on how to make Hermione happy. He would see it as a natural progression of their friendship and be glad that they are exploring a romantic relationship.
Harry could initially be in shock. He's always counted on Hermione, so her abandonment would be a huge blow. He might feel a sense of betrayal and confusion.
She could get angry. Hermione, being the strong - willed character she is, might feel betrayed that Harry is leaving. She might yell at him, asking him why he's doing this and how he could leave her after all they've been through together. Her anger is really a mask for her deep sadness and fear of losing him.
She might be initially confused. Hermione is a logical person, and without an obvious reason for Harry's silence, she would be at a loss. She would probably try to think back on their recent interactions to figure out what went wrong.
Hermione would probably be deeply hurt at first. She trusts Harry and Ron so much, and being abandoned by them would be a huge blow. But she's also very determined. So, she might throw herself into her studies even more, using her knowledge as a way to cope and also to find a solution to the situation.
Perhaps she tries to find them right away. Using her intelligence and resourcefulness, she starts to search for any clues as to where they might have gone. She could ask other friends, like Neville or Luna, if they have seen Harry and Ron. And she might be determined to bring them back, not willing to give up on their friendship easily.
The teachers at Hogwarts would have different reactions. McGonagall might be disappointed in Hermione's choice, seeing it as a disruption to the harmony of the school. She might also be concerned about the potential for drama and distraction. Dumbledore, on the other hand, would be more understanding. He would likely see it as a complex emotional situation and might try to guide Hermione through it. Snape himself would be in a very difficult position. He's not used to this kind of attention and might initially reject Hermione's feelings out of self - preservation and his own past traumas.