Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
typosaurus1215446dImagine having to do that instead of just native javascript. All this hard shit is easy to build yourself in an easy way and fun. I didn't like veux and did build a statemanager myself long ago. It worked perfect and easy. veux was also not made by the original vue developer and that was very well to notice. The original vue developer is great, he made a framework that you can learn in record time. But no framework is best
-
antigermgerm39246dI love react because it is simple. It can be tricky at time, but most of the time i get stuck I realize I tried to over-engineer things.
Is your child component pure? It sounds like you just need to pass an onHover callback down -
12bitfloat937346d@retoor I know right. Most of these frontend frameworks are so insanely over engineered
Like why is reddit so damn laggy? It's literally just a static page with an infinite scroll. That's like 200 lines of javascript in total. Instead they pull in megabytes of minified jabbascript -
antigermgerm39246d
-
Hazarth950646dI know little of frontend and I don't really like any of the frameworks, but recently I was giving svelte 5 a try and it's kinda working for me. I like the "runes" they introduced and it's (for the most part) intuitive to work with... but I'm only using it for toy projects with a proper compiled backend so I can't say much more about it
-
typosaurus1215446d@12bitfloat reddit keeps live track of people in the room and upvotes from messages right? It's impressive but what a waste of resources. What's the value? I've read that YouTube calculates the amount of views that it should have by now for videos. It's not the real live amount of likes. That's why you can see it updating while doing F5. It was an article on high scalability.com. Also, they streamed every video from a custom mysql backend engine. Don't know if they still do that. I would consider it heavy abuse of a db engine
-
devRancid64845dReddit just has awful engineers, it's possible to achieve good performance and little js with either vanilla or frameworks
Remember the video quality picker downloads all of them at once and chooses it locally
Or the year old bug where you send a post multiple times -
12bitfloat937345d@retoor Okay but still, that's like an additional 20 lines of javascript. I just don't see how most websites need these kitchen sink behemoth libraries when fetch() and appendChild() would have done the same thing in a fraction of the complexity and overhead
-
antigermgerm39245d@12bitfloat DOM calls number increase exponentially. React is not that big, it just keep tracks of state and check when to update what. The biggest part is JSX which is just syntaxic sugar.
-
typosaurus1215445d@12bitfloat fetch is fine but axios is better. My solution would be to write what I like about axios in an own library that you can use everywhere rather than using axios. It's so easy to make. Can write it out of my head in a hour, maybe two, or so, the important parts. Js is so easy and rapid development. I do understand why people like typescript, it feels more like programming. I wouldnt use typescript for the error reducing feature
-
sjwsjwsjw156844d@antigermgerm I don't think the child component is pure at the moment.
It needs to change a parent component variable to unpause the urql query, which would be the data rendered by the child component.
I have a working solution that has the lazy loaded query data which is kicked off by first hover, all together in the child component.
Problem is the stubbing that out for storybook test data, which seems neatly solved with a react useContext, but I was asked if we can work around this. Leading me to my original post. -
sjwsjwsjw156843d@sjwsjwsjw
just pulling the eventHandler up to do the work against variables pulled up, then passed down to child worked
i dont understand and still hate react
i fucking hate react and don't understand react
Is it cleaner to have useContext to pipe in override test data for storybook and write an outer context for that code only? Real production code can ignore and not set this.
Can child component onHover update parent's stateful variable to unpause the urql/graphql datafetch in parent data wrapper component. Parent pipes queried data to child component to properly display on hover that kicked process off.
rant