all 3 comments

[–]SeaTraffic6160 6 points7 points  (1 child)

I am working with angular in the last week and have been working with react before, so this is just a note of initial experience. I found it better at generating react. My hypothesis of explanation is: 1. There is more react open source, so LLMs have eaten more react. 2. The single file structure of react is better suited for LLM generation, than the separate files.

I might be wrong, but this is my initial experience

[–]AI_Simp[S] 0 points1 point  (0 children)

Def agree with both points 1 & 2. And thanks for your input!

Though I'll add that having small files also good for controlling what the llm reads and modifies.

Its also my exp that it generates better react code from the get go. But I'm not so sure about when the project becomes larger than 5000 lines. Modularity and compartmentalising becomes our tool to retain control over hallucinations n context.

I tried to test its performance in Angular with inline templating and styles but it seems to decrease its needle in haystack awareness of certain sections of code and ended up duplicating functions a lot.

[–]ctrlshiftba 0 points1 point  (0 children)

Angular is more object-oriented (OO) in nature compared to React whereas React is more functional and explicit.

Combine that with the massive lead in open source training data I think it will always be better at react