Earlier quoted context omitted.
I think that's a very common experience when you try to make it write niche stuff. It just makes everything up wholesale. If you on the other hand wanted to write a react app ...
But then I may as well have the AI say no, I don't know how to do that, here are some useful resources. Instead of misleading me and making me waste my time figuring out why the code doesn't work
It might be hard to tune it though so that AI won't claim that it doesn't know something when it does, by error, or just because it doesn't like you.
It's not uncommon for a student to say they don't know something they actually do when they are questioned.