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
-
retoor11394239dconst pony = () => {
// lala
}
Is just freaking
function pony() {
// lala.
}
What the fuck is wrong with those guys. It's fun and create but sigh.. -
retoor11394239d@jestdotty there's some sick commercial company after it that wants you to host on their servers?
I tried svelte btw. It's easy but I can't create something like vuetify when it comes to gui -
jestdotty5113239d@retoor idk I just find the syntax not insufferable
the react people told me to reinstall my whole OS because I couldn't get their tutorial app to work. that's no way to make a package. it was their first suggestion. I also pointed out their tutorial site was incorrect in its documentation. nobody cares over there. so I don't care to learn it.
haven't touched vue
I liked pugjs way back when. I just built websites with jquery and jade (now called pugjs), then moved to svelte after and pugjs fell out of favor (it's just templating for html) -
AlgoRythm50820239dIn this example, 2 definitely looks cleaner. But I’m torn between “this is cherry-picking because stateful items in react are ugly” and “why does state need to be so ugly in react?”
-
Lensflare16995239dimport SwiftUI
struct Counter: View {
@State var count = 0
var body: some View {
Button {
count += 1
} label: {
Text("Count: \(count)")
}
}
} -
dissolvedgirl1063238dOption 2, but I'd probably do it with Composition API. I like it more.
Also, React sucks, fuck React. It made me angry the other day. -
Ranchonyx10617236dWhy use a framework when you can just use a vanilla webcomponent to achieve the same with less overhead.
-
retoor11394236d@Ranchonyx this code in the vanilla way is waaaaay more code. Shadowdom fuckery and stuff
-
Ranchonyx10617236d@retoor Not wrong, but doesn't it "compile" down to the same expressions anyway?
-
retoor11394236d@Ranchonyx probably, but native webcomponets are reallii hard. Try vue for fun. It is fun
-
jestdotty5113236d@retoor make your own framework, with blackjack and hookers
if something is long to write make a method... whoops fell down into making 100th js framework
Related Rants
It's time for war!
I have two examples doing the same thing. They're bot generated by chatGPT.
React:
import React, { useState } from 'react';
function IncrementalButton() {
// Create state to hold the count value
const [count, setCount] = useState(0);
// Function to handle incrementing the count
const increment = () => {
setCount(count + 1);
};
return (
<div>
<h2>Count: {count}</h2>
<button onClick={increment}>Increment</button>
</div>
);
}
export default IncrementalButton;
VUE:
<template>
<div>
<h2>Count: {{ count }}</h2>
<button @click="increment">Increment</button>
</div>
</template>
<script>
export default {
data() {
return {
count: 0,
};
},
methods: {
increment() {
this.count++;
},
},
};
</script>
<style>
/* Add your CSS styles here if needed */
</style>
Whats better in your opinion?
random
button
vs
react
vue
fight
web