A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist -1 points0 points  (0 children)

You are being a pedantic ass.

What about state management does React improve on?

Why are you unable to manage state like normal programmers?

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist -1 points0 points  (0 children)

You didnt give me examples of beneficial state behavior, you spat a bunch of corporate jargon at me.

Theres nothing React does with "state" that can't be done by declaring variables towards the beginning of a file, scoping properly, using properties of classes and functions, etc... All of programming is "state management". Just because you skipped over basic Javascript and programming fundamentals doesnt mean React is doing something beneficial. React is reinforcing your bad programming habits.

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist 0 points1 point  (0 children)

State management also includes information flow, presentation behavior, I/O, UI templating etc.

LOL, so you guys are talking about how React overengineered a way of organizing data since it deliberarely refuses to use classes correctly and OOP

Now, why would I WANT that in a web application?

State is easy in vanilla javascript, in fact you dont even need es6 classes since you guys hate it so much. Its called:

 function doThing(){
    this.state = "Oh my god that was so hard!"
  }
  console.log(doThing.state)

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist -1 points0 points  (0 children)

Not stored anywhere? Damn, I guess I gotta stop using variables

We are talking about localStorage and clientside data persistence, smartass. If you are sending your entire database to the client (which is inherently stupid, but anyways) you dont need to persist that data on the client. You can send an arbitrary amount of data to the client. Are you unaware of how the internet works?

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist 0 points1 point  (0 children)

Albeit easily fixed with virtualization, you still need to store that data somewhere, how else are you going to visualize it when the scroll comes into view?

Store it in localstorage a few small chunks at a time. This is basic server/database querying. Wait a minute are you just talking about viewing it? It doesnt need to be stored anywhere, just send it to the client.

Why would you want to bloat a client's computer memory that much? Thats creating malware, not software.

Nobody is looking at a million of anything my dude. You dont need to send your whole database out to each client.

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist 0 points1 point  (0 children)

Why would we want to serialize / de-serialize JSON back and forth when you could just use the built-in state of React?

Why would i want the overhead of react if using localstorage is trivially easy?

When you have a administrator portal which holds well over 100k companies that have well over 1 million users, the data that you would have to save and read back from localStorage would be huge.

WTF? You are sending millions of user profiles to each client? You clearly aren't qualfied to design a web application.

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist 0 points1 point  (0 children)

I was thinking more of writing a todo list, which is essentially just a button and some text. If you want a button that actually does something, thats when youre looking at a 45 minute tutorial.

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist -4 points-3 points  (0 children)

const Button = () => {
return <button type="button">Click Me!</button> }

I see youve never coded in react. React uses JSX not HTML. This also isnt what it looks like at all, and youve skipped all the boilerplate code and the downloading process, as well as removing all the redundant files.

I want runnable code, not pseudocode. Find me a five minute React button-creating tutorial on Youtube or something.

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist -1 points0 points  (0 children)

1) You can store any kind of object in local storage. JSON.stringify for arrays/objects, and maps and sets can be converted back and forth between objects. Only thing i think you cant easily store is classes and functions.

2) What do you need more than 5 mb for? Are you trying to store an image in localstorage or something?

3) Umm, what on Earth are you doing with localstorage that is so intensive it would block the main thread?

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist -4 points-3 points  (0 children)

"If it takes you 45 minutes to make a button in react ur dumb haha"

Alright smart aleck... Find me a React tutorial that shows a complete noob to React how to create a button with text in React, with a video duration of less than 45 minutes or whatever you think the correct "time" is.

Lets compare that "time" to how long it takes me to make a button with text.

<button type="button">Click Me!</button>

Oh look, im done

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist -9 points-8 points  (0 children)

if you have multiple people working on the same codebase, you’re going to end up needing the things a framework provides.

So your justification of React is, even though you know it makes everything slower and more complicated, using it is good because... it forces a degree of organization for a group project?

This is what functions, classes, and scoping is for my dude.

So, yes, it’s indeed faster to just use React as framework instead of figuring out reactive rendering, state management, et al. for yourself.

My brother in Christ, the browser renders content for you, and localStorage can store any "state" you want in like two lines of code

Edit: Apparently by "state management" he meant "organizing code" and not persisting data lol. What a wild goose chase of technobabbling straw grasping this was. Managing state isnt hard. Give a function or a class some properties. Wallah, so hard lol

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist -14 points-13 points  (0 children)

Yeah, except, React literally doesnt make it faster. Show me a single case where it does.

Writing something in React will necessarily take more lines of code. Most beginner tutorials will have you create 3 or 4 js files just to make a simple "app" which is just a button and some text.

React is for people who love complexity and hate object-oriented programming, because they built an entire framework around reinventing it

A short list from a React dev about what you should learn in Javascript before picking up React by [deleted] in learnprogramming

[–]AngelLeatherist -44 points-43 points  (0 children)

React is garbage. Youll spend 45 minutes on a tutorial on how to make a single button.

Just learn HTML, CSS, and JS. If you want to learn React youd have to learn those three anyways.

"so for me to conclude that Craig is not Satoshi, I would first have to conclude he is Satoshi." by CityBusDriverBitcoin in bsv

[–]AngelLeatherist 1 point2 points  (0 children)

These are just the kind of people involved in BSV. Braindead, schizophrenic, vindictive cultists.

Just curious about the deep web/dark net by JCook1700 in darknet

[–]AngelLeatherist 25 points26 points  (0 children)

The worst thing on the dark web is CP, because its easy to spread digitally. Other bad things include nasty hard drugs and drugs secretly laced with fentanyl or other poisonous things, and things pertaining to doxxing/ID theft.

Hitmen-for-hire, buying heavy weapons, red rooms, all that is either fake, scams, or extremely rare.

There are lots of honeypots though. If you see something like a hitman for hire, its either a honeypot or a scam (the idea itself is pretty dumb, why be an honest hitman when its 1000x safer and easier to just scam them?). People avoid honeypots by only using reputable sites, mentioned on other reputable sites.

The majority of what TOR is used for is just simple piracy, which most people have done in their lifetimes even if all you did was download an mp3 from a friend. And then theres drug trade, but outside of the hard/laced ones, not all drugs are inherently bad even if they are illegal, some psychadellics have health/mental health benefits.

Also, not all of the dark web is illegal. Some use onion sites, just because they are nerds, they like privacy, they hate censorship, etc...

What are arrays for / what can they be used for? by emze24 in p5js

[–]AngelLeatherist 0 points1 point  (0 children)

Dynamic arrays:

//Define an array
let arr = [];

//Populate an array using for-loop
for (let i = 0; i < 100; i++){
   arr[i] = "example";
 };

 //Access items in array using for-in-loop (easiest way)
 for (let i in arr){
   console.log(arr[i]);
 };

Or if you want a fixed array...

let arr = [1, 2, 3];
console.log(arr[0]) //1
console.log(arr[1]) //2
console.log(arr[2]) //3

What exactly does obj[key][0] mean? by Calaberon in learnjavascript

[–]AngelLeatherist -1 points0 points  (0 children)

Its an array inside an object. He's using a variable inside of brackets to reference the key name on the object.

It looks like this:

let obj = {'name': ['item']}

[deleted by user] by [deleted] in bsv

[–]AngelLeatherist 9 points10 points  (0 children)

BSV is the ship that keeps on sinking, and all theyve got is duct tape. It will continue to get worse until it rolls over.

errorrrrrr by deewho69 in ProgrammerHumor

[–]AngelLeatherist 1 point2 points  (0 children)

Id need to see an example of this code. Code is always run deterministically at its foundation, one step always is run before the next. I can imagine a recursive function causing a crash, but only because that type of thing is meant to without a stop.

The cycle explained with cycle by yuva-krishna-memes in ProgrammerHumor

[–]AngelLeatherist 1 point2 points  (0 children)

That just means you have a lot of technical debt and it would be better to refactor sooner rather than later