4 ms·
This is super cool. If I worked in React I would love the ability to build most of an MVC through a GUI like this and avoid the waste of time. I really hate Re
by noduerme 5y ago
This is super cool. If I worked in React I would love the ability to build most of an MVC through a GUI like this and avoid the waste of time.
I really hate React, though. Throwing logic into HTML and JSX... just feels so hackish. Like, if I want to alter states on a thing in the DOM, I want all that logic in the JS in one neat class, not mixed with control flow in a template somewhere else. /rant
Still, I think a front-end like this could actually make it a lot friendlier for newbs and also save a ton of time for people who have to work in what I consider a nightmare of a stack... either way it looks like a samurai level piece of code that will be appreciated.
- pc86 5y agoJust a few days ago someone posted some snarky HN comments on React's initial release thread talking exactly about HTML and JSX being hackish, and all I could think was "well... it is." The popularity and success of a project doesn't mean that all its core assumptions/opinions are good, only that the project is popular and successful. Vue isn't perfect but I much prefer how it still lets you separate out various concerns. If it had half (or even 1/3) the community React does I think it could surpass React.
- noduerme 5y ago>>The popularity and success of a project I think React (and Vue) are popular and successful because they meet 80% of the needs 80% of the time, and that's what you want and need from frameworks that are trying to do everything for everybody. They also make it a lot easier to go from a 6-month course into a low level coding job, and corporations are happier because the parts are more replaceable. In my mind, they're rather limited and hard to work with if you want to do anything outside the box, but there are always going to be frameworks because they solve the most common problems quickly.
- deleted 5y ago[deleted]
- tepitoperrito 5y agoYou might not hate react, you might just be holding it wrong. A component could represent a discrete entity or thing you'd like to alter the state of. You might be able to handle that all locally in that component but beyond this limited case don't try to shoehorn state management into a view library. I highly recommend spending a few minutes getting to know MobX which I think maps very well to the concept of business logic and state encapsulated (in one class if you'd like) and seperated from the view layer.
- noduerme 5y agoI built my own "reactive" stack a decade ago and just keep refining it. I wanted to de-couple template HTML from visual logic, and visual logic from business logic. So I model everything on components within components, they all bootstrap whatever DOM templates they need and inherit the same basic methods, and it's all tied together with an event model that handles long polling and push updates but, crucially, does not do anything in the basic HTML templates other than adding a couple attributes like "role='photo-button'" where you need them. Server updates cascade to each JS component which updates the things it thinks need to be updated at a given time. It's more hand-coded, but it's easier to read and a lot easier to micro-manage.
- deleted 5y ago[deleted]