Docs: https://reactjs.org/docs/hooks-effect.html

GitHub: https://github.com/JoeG21/medium-ex/blob/master/react-hooks-useeffect/src/App.js

When learning hooks, useEffect is another important one to know and use in your application. Whenever we need some sort of side of effect to happen when we change our state then useEffect is perfect for that.

This is the same thing as using the lifecycle methods, like mounting and updating. But in a functional component, we don’t have access to those lifecycle methods. In order to get around this we use the useEffect hook

For our example we are going to build out this out.

Image for post
Image for post

First, we have to import useEffect from react like we did for useState. If you do not know useState then you can check out my blog on it! https://devjoe.medium.com/implementing-react-hooks-usestate-53e565669439


Documentation: https://reactjs.org/docs/hooks-intro.html

GitHub: https://github.com/JoeG21/medium-ex/blob/master/react-hooks-useState/src/App.js

So after learning hooks, I understand why developers prefer them over Class Components. It’s much easier to main the state and of course update it. It’s nothing too hard to understand but can be somewhat confusing for first timers. I would recommend going back to old projects of yours and refactoring them into functional components.

There’s 2 things you need to know before incorporating hooks into your application. The 1st being, you can only use hooks in functional components. …


Image for post
Image for post

Without giving any real thought, flipping a card seem pretty simple. But like all things when it comes to doing it you may be lost on where to start. If your application uses cards and you need them to flip when a user click on them, then I hope my explanation can help you. For this example I’m going to be using a class component, however you can of course use a functional component and set state with hooks instead.

First thing we need to do is set state of a variable to a boolean value.


Depth-First Search is probably the fundamental graph traversal or tree traversal algorithm. It is used in many different questions including questions that seem like they’re unrelated to graphs, but can actually be turned into graph problems. We can think of it like a tree structure, and you have to traverse through its leafs (Nodes), find connections to other leafs, backtrack when you run out of paths, and repeat the process until all leafs are accounted for. These nodes can be any type of data, like Strings and Numbers.

Breadth-First Search is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root, and explores all of the neighbors nodes at the present depth prior to moving on to the nodes at the next depth level. …


A directed graph is strongly connected if there is a path between all pairs of vertices. A strongly connected component of a directed graph is a maximal strongly connected subgraph.

A graph is said to be strongly connected if every vertex is reachable from every other vertex.

Finding SCC

Image for post
Image for post

First we’ll depth-first, basically starting at a point and seeing what path it has to take. For this instance I started at A, in order for us to keep track we will simply put a number above the node we’re currently on. And go down a path that is reachable from said node, so I went to B. Incrementing the number by one for each node we reach. …


Image for post
Image for post

Through out High School I always imagined my path was to graduate, dedicate more years of my life to school, and find a job. A very traditional path, but a path that I came to realize it wasn’t for me. I would have liked to say that after graduation I continue to educate myself, learn new skills, and achieve goals I set out for. Making myself sound smatter and successful but in reality I stuck in a loop. Wake up, work, eat, sleep, and repeat. An endless loop that seem to be unbreakable, and that’s because I was settling for the minimum. I knew something needed to change in order for me to move to the next chapter in my life. …


What is the first thing that comes to mind when you hear “A.I.”? To some it’s a complex intimidating term that has nothing to do with their field of work or daily lives.The other side of the spectrum, immediately think humanoid robots with piercing red eyes wanting to takeover mankind. Even though they are on the opposite side of the coin, they have one thing in common. They’re using some type of A.I. without them even knowing.

Image for post
Image for post

Artificial Intelligence are in everyone’s routines from the smallest things like searching something up on google, to more substantial tasks like commercial airline flights. …


History

Image for post
Image for post

Before Object-Oriented Programming, OOP, there was Procedural Programming that divided a program to a set of functions. Data would be stored with variables and functions that operate on the data, but as you would imagine when your program becomes more dynamic this would cause problems. You would find yourself copying and pasting line of code over and over; make a change to one function and others will break. Having too many interdependencies between all these functions is problematic. Also know as “spaghetti code”, this way of coding gave birth to the theory of Object-Oriented Programming.

Pioneers

About

Joe C Gomez

I’m a Software Engineer who is always learning something new!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store