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
-
typosaurus12224283dconst pony = () => {
// lala
}
Is just freaking
function pony() {
// lala.
}
What the fuck is wrong with those guys. It's fun and create but sigh.. -
typosaurus12224283d@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 -
jestdotty5704283d@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) -
AlgoRythm50256283dIn 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?”
-
Lensflare17538283dimport SwiftUI
struct Counter: View {
@State var count = 0
var body: some View {
Button {
count += 1
} label: {
Text("Count: \(count)")
}
}
} -
Ranchonyx10539281dWhy use a framework when you can just use a vanilla webcomponent to achieve the same with less overhead.
-
typosaurus12224280d@Ranchonyx this code in the vanilla way is waaaaay more code. Shadowdom fuckery and stuff
-
Ranchonyx10539280d@retoor Not wrong, but doesn't it "compile" down to the same expressions anyway?
-
typosaurus12224280d@Ranchonyx probably, but native webcomponets are reallii hard. Try vue for fun. It is fun
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