How to freeze your enemy’s ReactJS app – n3rdiii blog

How to freeze your enemy’s ReactJS app  #javascript

  • setState ({ hasPets : true})} defaultValue = { true }> < option /> < option value = { true }>YES < option value = { false }>NO ); } }
  • I work as a full stack developer for a social marketing company in Los Angeles and write about my adventures in tech, travel, pole dancing, and life on Medium.
  • After the enemy is defeated it’s time to teach them a valuable lesson in the winning ReactJS development.
  • Never miss a story from n3rdiii blog , when you sign up for Medium.
  • Subscribe to read more awesome articles about web development.

Today I will tell you how to destroy your rival with the advanced ReactJS technique. The goal of our Machiavellian operation is to freeze their browser. This will render the enemy’s coding attempts…

@ng_real_ninja: How to freeze your enemy’s ReactJS app #javascript

Hello, friends.

Today I will tell you how to destroy your rival with the advanced ReactJS technique. The goal of our Machiavellian operation is to freeze their browser. This will render the enemy’s coding attempts fruitless. Or at the very least impede their googling ability for the indefinite period of time. It works especially well with Firefox, because, well, Firefox.

It’s that simple. The enemy will receive an exponentially growing number of JavaScript errors in their Developer console that they won’t be able to debug anyway because the application will stop responding to any mouse or keyboard input. If you are lucky enough and your opponent uses Firefox, or their laptop is as sluggish as mine, their browser will enter a Ghost Mode (boo!). A condition impossible to resolve even with Apple’s ‘Force quit’ menu. It leads directly to the laptop restart. Brilliant move. Victory attained. Enemy defeated. Game score 1:0. You can thank me later, young Napoleon.

Now, after the enemy is defeated it’s time to teach them a valuable lesson in the winning ReactJS development.

setState(…): Cannot update during an existing state transition (such as within `render` or another component’s constructor).

This is what’s going on under the hoods of our Machiavellian operation. It’s a simple React knowledge. Updating the state in the ‘render’ method leads to an infinite loop. Brilliant!

The winning React approach is of course too simple for the enemy to detect and disarm you early on.

Or if you are feeling like a hacker today:

Either way, it is a triumph. That’s all, sweetpants. May the development force be with you always.

How to freeze your enemy’s ReactJS app – n3rdiii blog