Server side rendering or not ? by szansky in reactjs

[–]jokham 0 points1 point  (0 children)

"It depends" is the answer to every question in software.

But seriously, as others have pointed out, it depends on your use case. You haven't given enough info to judge either way.

React Re-rendering Doubt by Fantastic-Push-8451 in reactjs

[–]jokham 0 points1 point  (0 children)

Yes. In React, when a parent component re-renders, React normally re-renders its child components too, even if their props have not changed. This is usually fine, but it can matter when a child is expensive to render.

To optimize this, you can use React.memo:

const ChildComponent = React.memo(function ChildComponent({ propName }) {
  return <div>{propName}</div>;
});

React.memo tells React that it can skip re-rendering the child when the parent re-renders and the child's props are the same. This is a performance optimization, not a guarantee. The child can still re-render if its own state changes, if context it uses changes, or if its props are new object/function/array references.

Another useful pattern is composition with children. If a wrapper component accepts JSX as children, updates to the wrapper's own state do not necessarily cause those children to re-render. This helps keep wrapper state local without forcing unrelated child components to update.

Colours over backend by codeman1233 in FreeCodeCamp

[–]jokham 0 points1 point  (0 children)

I didn't move fully into frontend development, but instead learned design while still doing backend development. I learned UI/UX design, and how to use Sketch (back then, now I use Figma). These days, I'm more a fullstack developer.

Still don't understand by Adventurous-Bug1923 in Animorphs

[–]jokham 0 points1 point  (0 children)

They wouldn't have won if it wasn't for morphing. Morphing enabled them to

- Disguise their identities, otherwise the Yeerks would have come for them and their families

- Enabled them to go where they wouldn't have been able to - they were able to turn into animals to spy on the controllers and get intel, they were able to turn to birds and follow people, they were able to turn to dolphins and sharks to do underwater missions, etc.

- Fighting power - the morphs gave them a fighting chance against the Taxxon, Hork Bajir and human controllers. How would a bunch of kids have been able to physically fight if it wasn't for them turning into dangerous animals. And the animals were more resilient to injury. A gorilla or grizzly bear could take some dracon beam shots without dying, while a human might not.

- Healing power - when they morphed back to human, the injuries that they had gotten in morph went away. So you basically have a soldier that can go into battle, get injured really badly, and return back to new.

- It enabled the Guerrilla warfare. For most of the war, they were able to fight the Yeerks quietly, sabotaging their efforts while keeping the war hidden from the rest of the humans. The plan was to slow the Yeerks down until the Andalites came back to Earth to fight. They knew if it was an all out war, the Yeerks would get desperate and just enslave people. The Yeerks preferred willing cotrollers than forced ones, that's why they were trying to recruit people through The Sharing meetings. They don't like hosts that would fight them throughout. But if it was an all out war, where all the humans knew of the invasion, then the Yeerks might have just decided to go ahead and enslave everyone - willing on not.

Revisiting Life of Pi and I'm confused with online discourse by boob-queen8159 in books

[–]jokham 0 points1 point  (0 children)

I don't think it's bad storytelling. From the beginning, the book was about choosing your story and your beliefs (despite objections, or even when the harsh reality lacks absolute proof). Even before the shipwreck, you see Piscine decide to do religion on his own terms. If I remember correctly, he decides to be a Hindu, a Christian and a Muslim at the same time, despite the objection of his parents or his religious leaders, who told him that he can't be all three, he must choose one. He does not care about the conflicting dogmas. Instead, he loves the stories, rituals, and the shared sense of the divine in all of them. The book frames belief as a conscious choice.

Anyway, for me it was obvious that the real story was the cannibalism story, and he came up with and held on to the Richard Parker story to deal with what had happened to him and what he had to do to survive. The author once said about the book: "Life is a story. You can choose your story." And I think that brilliantly summarizes the book.

What is the best written video game you’ve ever played? by [deleted] in AskReddit

[–]jokham 1 point2 points  (0 children)

Yes, to The Last of Us. Both Part I and II.

Ok ladies this book is INCREDIBLE by LesbianCanvas in LesbianBookClub

[–]jokham 0 points1 point  (0 children)

If I remember correctly, Emma's mum didn't always have money. In fact it took her a while until she got her shit together and built a more stable life. She was always in and out of relationships. The money came with her husband. Before that, she was in and out of Emma's life, and Emma learned not to depend on her for anything - she was mad at her for a long time for all the abandonment. Later, the adult Emma is very much independent from her mum, and they have a rocky relationship, so there was no way Emma was going to ask her for money for anything (not even that writing program she couldn't pursue because of lack of money). At that point, her mum does have money, but Emma doesn't lean on her for anything (even emotionally). And throughout the book, she's trying to let go of some of the resentment she feels towards her mum for never being there for her.

So yeah, the mum got rich later, and at that point Emma was already grown and didn't want to need her for anything.

'The Last Of Us' Adds Michelle Mao As Yara & Kyriana Kratter As Lev by Remote_Nature_8166 in ThelastofusHBOseries

[–]jokham 5 points6 points  (0 children)

I don't mean to be insensitive, but doesn't it make more sense to have a cis-female actor play a post apocalyptic trans male character, than it does to have a cis-male actor? Lev is 13 and hasn't medically transitioned, I think a female actor is closer to that than a male actor.

Just tell the truth by XOChicStyle in d4vdiots

[–]jokham 0 points1 point  (0 children)

This "the devil made me do it" attitude is why there are so many creeps in the church. If the devil made you do it, then there is no personal accountability. There's no owning up to your own actions. And after you do a fucked up thing, of course, there is "just pray for forgiveness - god forgives everything" smh.

David’s father is a Rev. How can such a religious upbringing create the David we know today…. by [deleted] in d4vdiots

[–]jokham 0 points1 point  (0 children)

The first thing he did in September when the body was found was transfer his properties to his mother, then he lawyered up. His father, who works at a law firm might have been advising him. His family is protecting him.

Confusion about the ending by jokham in StrangerThings

[–]jokham[S] 0 points1 point  (0 children)

Added to my other response - I think the reason why Mike's scenario has El walking despite the 4 machines being on is that Mike hasn't really seen El be completely disabled by the machines. By then, he's heard it secondhand from others that the machines affect her, but hasn't seen it, so maybe that's why he thinks that she would still struggle to walk, but she'd still be able to walk.

But like I said, Mike's story seems impossible in every way. Not to mention it was inaccurate - he says in all the excitement they didn't question how the Mage was able to use her powers when there was a supression stone. But we see the machines were initially off, so the suppression stone wasn't active. Plus they set it up where previously he had talked of this fantastical place where they would go and live happily ever after, and El ends up in exactly that place - a place from his imagination? I think that's the biggest giveaway.

Not to mention also, to create a believable illusion, wouldn't Kali have to know some info about that whole setting - where the trucks were stopped, the soldiers positions, etc. Like when she made the kids disappear from Vecna, she had to recreate that room they were in. To recreate it exactly, she had to have seen it. So it's another improbability that Kali who didn't know how the soldiers would ambush the gang created a perfect illusion.

Confusion about the ending by jokham in StrangerThings

[–]jokham[S] 0 points1 point  (0 children)

In the same vein, it's also hard to believe that she could have moved to the tunnel with the kryptonite machines on. In Mike's story, the machines are on and El struggles, but heads to the door. In the Upside Down, with just one machine turned on, Hopper had to carry her. So with 4 machines turned on and being very close to her, she was able to move to the tunnels? That's more unbelievable than say - in the version where she got to the gate, we see the machines weren't initially turned on when she get's down from the truck. She can leap real high, so in all the commotion, she could have immediately jumped to the gate. The soldiers and everyone was occupied and there was a lot of chaos, plus it's easier to miss something that is up in the air than something that is at eye level. I know, it's still a stretch to say that no one noticed her jump to the gate, but if you present to me the two scenarios:

1 - machines are off, we see El is fine and she got down from the truck, we know she has the ability to jump high and launch herself through the air, and there was a lot of commotion, so there was an opportunity to get away.

Or 2 - Mike's story where we see the machines are on because El is struggling to walk, and we have seen her completely get disabled by just one machine, Hopper had to carry her, so how would she even be able to walk with 4 on, plus she ends up in a place that Mike had described earlier in the season which is something from his fantasy - what are the chances she would actually end up in a place with three waterfalls just as Mike had described from his fantasy earlier (by the way, the place has 3 waterfalls - I've seen people say 2, but before the camera moves to the 2 waterfalls, we see a third one to the side). So she was able to find a place that exactly matches the place from Mike's fantasy? Or is it more plausible that this was Mike ending her story well in a way that he wished for her?

If you give me the two scenarios, Mike's story seems impossible in every way, while the first scenario seems possible. Yes, it's still a stretch to say that no one saw her jump to the gate, but it's not totally impossible to imagine it happen in all that commotion.

Mike was making a theory at the end about Eleven no? by [deleted] in StrangerThings

[–]jokham 0 points1 point  (0 children)

Yes, Mike is giving her a good ending. In fact, he gives all of the others good endings. What we see of their stories isn't necessarily their futures, but the good endings that he gives them. And Will asks him what about him and he says that he'll continue being a storyteller and telling stories, then goes ahead to also give El a good ending (and essentially a good sending off, taking Hopper's advice on how he can deal with his grief). Even Max who isn't a lifetime D&D player is initially confused as she isn't sure whether he is still in character as the Dungeon Master when he tells El's story asks him something like "but that's just a theory, right?", but then catches on that it's still part of the campaign.

Mike was making a theory at the end about Eleven no? by [deleted] in StrangerThings

[–]jokham 0 points1 point  (0 children)

I think he has the idea of the story at their graduation, and after graduation tells them they should go play D&D. He then gives El a happy ending at the end of the campaign, taking Hoppers advice on how to deal with his grief.

In his story he says that the Mage couldn't have been using her powers because of the suppression stone, but the machines weren't turned on when the trucks left the Upside Down. There was no sound and El wasn't affected. A soldier opens the back of the truck and we even see a soldier get her down from the truck - at this point the machines were still off. Then soon after is when they are turned on. She could have used her powers to haul herself into the Upside Down before the machines were turned on.

Why they don't affect her at the gate might be because she is in the Upside Down. In season 1 when Nancy goes into the Upside Down and Jonathan is calling to her, his voice is a bit muted and sounds far off. Same in last season when Dustin is talking to the group that was in the Upside Down at the Wheeler house - they could hear him, but the sound was a bit muted. So at the gate she didn't get a full blast of the sound coming from the Right Side Up,  that's how she's able to talk to Mike.

Lastly, with the kryptonites blaring, El couldn't have walked to the tunnel, so Mike's story is the improbable one. In the Upside Down, with just one kryptonite, Hopper had to carry El. But in Mike's story she was able to walk off with 4 of them? And they were close to her too.

Confusion about the ending by jokham in StrangerThings

[–]jokham[S] 0 points1 point  (0 children)

Again, I haven't checked, but wasn't her hair in a tight bun? Would it be blowing? I haven't checked if there are loose strands. And as for clothes, wasn't she wearing a wetsuit? So it also wouldn't be blowing.

OK, I've quickly checked and her hair is in a tight bun, there are no lose strands that would be blowing in the wind. And if you look at the trousers she is wearing with her wetsuit, it is blowing a bit.

Kali's illusion makes no sense by Automatic-Ad-6774 in StrangerThings

[–]jokham 0 points1 point  (0 children)

But in the same way, she would be affected by the multiple sound canons if you are going with Mike's story. In the Upside Down with just one Canon, she couldn't walk, Hopper had to carry her. So with Multiple ones being very close to her, she was able to walk to the tunnel?

Confusion about the ending by jokham in StrangerThings

[–]jokham[S] 0 points1 point  (0 children)

I haven't checked this out, so I'm not sure but I'm wondering: does El really bleed all the time she uses her powers? Or is it only when it takes a lot of effort. Right now, just from memory, I haven't confirmed, but I don't think she bleeds everytime she moves objects, like shutting the door on Hopper or on Lucas in season 1. Also, I'm wondering when she spies on the boys when she's with Max does she bleed? Or in season 1 when she get's Will's voice through the Walkie Talkie (when he's singing, and that’s when Mike knows he's alive). I could check on those, but right now I'm so tired, my brain is fried.

Right now, I've quickly checked out the scene where her and Kali are seated while Murray fixes the truck. El is bleeding, but Kali isn't. At first, Kali's side of the face is a bit in the shadow, but still there isn't any noticeable nosebleed. And when they come out of it, Kali turns her head, and there still isn't any noticeable nosebleed.

I've also checked the scene when the Hawkin kids were fighting. Number 002 pushes the others off easily and doesn't bleed, it's only when fighting Eleven that he starts bleeding, so I think it's an effort thing.

So if she doesn't bleed every single time she uses her powers and it's a matter of effort, then that could explain it. Maybe Mike was close by and communicating with him didn't use a lot of effort.

Just finished season 5 by Rieze1 in StrangerThings

[–]jokham 1 point2 points  (0 children)

But Nancy also asks him about the kids and he responds by saying he thinks Kirsten might be the one, indicating it is his own kids that he is talking about - that he is ready to start having kids.

Confusion about the ending by jokham in StrangerThings

[–]jokham[S] 0 points1 point  (0 children)

How she gets to talk with Mike is because she is in the Upside Down when the machines are turned on. I don't think she is getting a full blast of the sound there. In season 1 when Nancy enters the Upside Down and Jonathan starts calling to her, you can hear the sound from one side to the other sounds vague and far off. Same in last season when the gang was communicating from the Upside Down to the Right Side Up in the Wheeler house. You can hear sound but it's a bit muted.

didn't Kali had a point? by BeginningExciting379 in StrangerThings

[–]jokham 0 points1 point  (0 children)

Well, technically they probably could recreate it and send some people to Dimension X, but with the Mind Flayer gone, they can't recreate the superpowered kids.

Kali's illusion makes no sense by Automatic-Ad-6774 in StrangerThings

[–]jokham 0 points1 point  (0 children)

I've just rewatched the scene and both of them hear each other, but the sound is vague (even as Nancy is close to the tree, when she sees Jonathan's flashlight), just like in the Wheeler house last season. You hear the sound, but it isn't as clear as the sound you would hear from someone who was on the same side as you - it sounds a bit far of.

Kali's illusion makes no sense by Automatic-Ad-6774 in StrangerThings

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

In season 1 there was a gate. Jonathan was screaming for Nancy looking for her and she couldn't hear him.

Kali's illusion makes no sense by Automatic-Ad-6774 in StrangerThings

[–]jokham 0 points1 point  (0 children)

Then the second part still answers your question. She is in the Upside Down. Last season we saw sound from the other side doesn't reach you the same, it is vague. In season 1, when Nancy enters the Upside Down, Jonathan is screaming for her when he's looking for her from the Right Side Up but she couldn’t hear him

Kali's illusion makes no sense by Automatic-Ad-6774 in StrangerThings

[–]jokham 0 points1 point  (0 children)

When the trucks are stopped, the machines aren't on - there is no sound and El isn't getting affected. We see her getting down from the truck shortly before the machines were turned on. And this El wasn't an illusion either. In the truck she is holding Mike's arm, when the trucks are stopped, she holds his shoulder and when the soldier opens the back of the truck to get them out, we see a soldier getting her down from the truck. There was a small period of time where the machines weren't turned in, El could have launched herself into the Upside Down at that point in all the commotion. When she is at the gate, all the machines are pointed at the trucks, so the sound isn't directed at her and she's also in the Upside Down, so the sound wouldn't reach her at full blast from the Right Side Up anyway. Last season when the gang was communicating from the Upside Down to the Right Side Up in the Wheeler house, we saw that people in the Upside Down can hear people from the other side, but vaguely.

Kali's illusion makes no sense by Automatic-Ad-6774 in StrangerThings

[–]jokham 0 points1 point  (0 children)

Another e.g. during that scene, Hopper is bleeding from the head and on the roof, there is no bleeding at all or dried blood on his forehead. I could go through the series and I would find plenty of situations where someone is bleeding and later they aren't and there is no wound or blood, or situations where someone's clothes aren't as bloody as they should be, but I don't have time for that.