Fans had been predicting that Dani would have a heel turn since the first book so it’s not like it wasn’t built up. D&D were just admittedly fanboys of the character and white washed her on the TV show so the twist came seemingly out of nowhere.
Edit: Thinking on it a bit more, it’s also in the books favor that we have access to Dani’s internal dialogue. It’s through this that we get a lot of foreshadowing about her future turn, and is definitely a way the books would have handled it better.
Fans had been predicting that Dani would have a heel turn since the first book so it’s not like it wasn’t built up. D&D were just admittedly fanboys of the character and white washed her on the TV show so the twist came seemingly out of nowhere.
Edit: Thinking on it a bit more, it’s also in the books favor that we have access to Dani’s internal dialogue. It’s through this that we get a lot of foreshadowing about her future turn, and is definitely a way the books would have handled it better.