ROUTES

Omar Gonzalez
2 min readFeb 24, 2021

Admit it, no matter where you were raised you have heard of the famous Route 66!What about a Route 44 from your favorite burger place, Sonic. There are so many uses and meanings for the word Route, and somehow I feel like I am about to enlighten you on the one meaning you do not know about. When thinking of routes in the eye of the developer, imagine it like the highway version, except for instead of cars its code that is traveling. That’s right folks it is that simple. You decide where the traffic signs are placed and have the power to direct traffic in any way that you want. Once we get to a little better understanding of them I may even talk to you about protected routes. Long story short these would be like toll roads where you have to have special credentials to gain access to the toll way.

Something that I have learned about this week in class are routes. I’m sure most of you already had that sense with the amazing intro that was provided.

How does hoisting work in JavaScript? Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope before code execution. In some easier words for the ears……or thoughts in this case? Hoisting is being declared after it has been used.

Why is setState() in React async instead of sync? This is because setState does not instantly mutate the state, but rather calls the state to you so you can do with it as you wish.

How is the Virtual-Dom more efficient than Dirty checking? The Virtual-Dom is just more efficient when it comes to re-rendering the web page plain and simple.

What is pureComponent? When should you use pureComponent over Component? You always want to avoid re-rendering cycles of your component when the state is not altered.

What is a higher order component? A higher order component is an advanced techniwue in React for reusing component logic. Higher order components are not part of the actual React API, but rather a pattern that emerges from React’s compositional nature.

How do you think you might use the checkAuth() function to actually verify a user's email and password? I feel like to check if the password and email youd have to include a little bit of regex in there. This would ensure that in fact the credentials provided were good to go.

--

--