3 ms·
Maybe you were using React for something that isn't highly interactive and thus React was adding more friction than utility?
by danabramov 8y ago
Maybe you were using React for something that isn't highly interactive and thus React was adding more friction than utility?
- andrewstuart 8y agoI think you are exactly correct, now I give it some thought. When I do ReactJS I'm building much more powerful UI features. The Django stuff is just a bunch of forms and that is really easy to drive.
- Waterluvian 8y agoWhen to use the more powerful tools is an important (and tricky) lesson to master. Not every project needs React. Lately I've been writing little personal projects using Vanilla JS. There's something rather therapeutic about limiting one's self to zero dependencies. I'm wildly surprised every time I come back to Vanilla JS to see just how many core features there are. I can do modules in the browser now! Yippee! And beyond that, not even using JS and just using Django Templates or Jinja is great too. But I write a lot of software that monitors and controls mobile robots in warehouses. For that kind of wild state management of 100+ data sources, all with their own incomplete states, controls, unpredictably erroneous behaviours, React + Redux is just a godsend.
- andrewstuart 8y agoOne of the things that makes it hard to choose which technology you begin with is that small projects don't stay small, even if you thing they will. So the risk is I think "hey it's s small project, I'll whip it up in Django", and then of course in six months I'm cursing myself for not starting in React.
- Waterluvian 8y agoYup. And there's no easy answer, I think. I think that part of it is just experience. You'll slowly learn to better predict which projects are likely to grow, especially in a way that needs a more expressive foundation. I also think that the, "aw crap I have to re-write this from Django Templates to React" isn't exactly a bad thing. You've probably learned a ton about the problem you're solving by focusing on the problem directly in front of you[1] rather than trying to plan for the future problems that you don't quite understand yet. So when you tear it down to build the next iteration, the code you're replacing wasn't the valuable part. [1] Not all projects are organic. But the ones that are, really benefit from a, "get this out in 2 weeks and learn what we don't yet know about it" rather than spending months trying to perfect some product that we're mostly just guessing at.
- edoceo 8y agoBuild one to throw away, you will anyway - F. Brooks
- MapleWalnut 8y agoI wish there was better story for integrating React with Django, so I can use Django for the simple views and React for the interactive stuff.
- root_axis 8y agoWhy can't you just serve up your react js assets like any other js asset when using django?
- andrewstuart 8y agoI think you'd use Django REST framework wouldn't you?
- onyeka 8y agoI recently just started replacing some jQuery functionality with React in a large Django project, using Django-Rest, it's actually been less complicated than I expected.
- ezarowny 8y agoI'm likely giving a talk on this exact subject in January (depending on scheduling). If you're curious about the various approaches I've tried, you can reach me at this username in all sorts of places.
- xab9 8y agoMany "web apps" are just a bunch of forms, crud operations and occasionally static pages for eula, privacy policy, faq and other knick-knacks.
- deleted 8y ago[deleted]
- xab9 8y agoOh Dan, my experiences are that eight companies out of ten are using react for _anything_. There were times when javascript === jquery. Nowdays javascript === react.