3 ms·
I've been rewriting one of my hobby projects. I'm going from vanilla javascript to react as a newbie in react. The project isn't even close to being finished wh
by sysbin 7y ago
I've been rewriting one of my hobby projects. I'm going from vanilla javascript to react as a newbie in react. The project isn't even close to being finished when I started the task of rewriting a month ago and the main thing I've noticed is improvement in code structure.
I think someone would have a better time getting their head around the code now and without me guiding them than before. Although the project was already well organized. I make directory structure and naming conventions a high priority/OCD obsession. I think thats mainly why my hobby projects never see an end.
Unlike the author I haven't went with Redux and I've been just using react context with hooks for passing data. I'm really pleased with react context because now things are even more organized than without using context. The only downside with react that I've encountered is trying for the least amount of re-rendering when context changes. I've been reading a lot of optimizing react blogs online. I'm trying to make the app realtime focused with websockets and I don't want to face a difficult situation later on where many users blows up the app to a crawl. Anyway I just wanted to express context is really useful so far.