I’ve Cracked the Code, Please Call Tech Support- Episode 30, Rogue Switches

Alex Alban
3 min readFeb 8, 2021

Pulling around the curve here on 411, and it has been a journey. Digging into the final checkpoint has been very helpful in both a knowledge acquisition sense, and in being reassured that I can do this stuff without a ton of initial direction.

  1. Discuss in words something you learned in class today or this week.

How to map over the “store” in Redux. It may sound like I’m late to the party here, but up to this point I had never really understood how exactly to do it and we’ve been going at such a clip that I couldn’t check the map.

However, now that we’re working on our “small business” checkpoint, I’m having to do this stuff on my own, at my pace. This is nice, as I’m not comparing my progress to anyone else’s, and I can just focus on learning and implementing the code.

2. What is Redux Thunk used for?

Thunk is middleware for Redux, which allows for asynchronous updating. This allows for easier code composition, and we don’t have to worry about dispatching a result in any particular order.

3. What is the difference between React Native and React?

As per simform.com, there are a few differences between React Native and React:

I. React is a JavaScript library while React Native is an entire framework for building cross-platform apps.

II. React uses the virtual DOM to render browser code, while native APIs are used in React Native.

III. React renders HTML in the UI, while React native uses JSX.

IV: CSS is used to style React, while another stylesheet is used for React Native.

V. CSS can be used for animation in React, while an animated API is used in React Native.

VI. React is used for web focused content, while React Native is best for mobile development.

4. Are you familiar with AMD/require.js or commonjs? What can they do for you?

I wasn’t familiar with them until this question! This post on stackoverflow.com was very helpful in my understanding.

Commonjs is a way of defining modules in React with the help of an exports object. It specifies that we need a require() function to fetch dependencies, an exports variable to export module contents, and a module identifier to require dependencies.

Require.js uses the AMD API, and is more suited for a browser environment.

5. Which (if there is) node library could you use to salve the algorithm problem you solved last night in your pre-homework?

NPM Build is the main focus of the pre-homework reading. This is a command that transpilates and minifies our React code so that the browser can read it. Most of the time, our create-react-app handles this logic for us.

6. Which (if there is) node library method could you use to solve the algorithm problem you solved in class tonight?

Tonight I’ve been working on my checkpoint, and, as mentioned earlier, re-learning how to map the state being stored in our store.js file in order to use it as props for our other components. This allows the components to access the data in a legible and accessible format, thus letting everything work, essentially.

7. Explain your troubleshooting techniques. Include devtools and environments.

Phew, this is a big question. I use multiple environments and techniques. If there’s a problem with an API, I use Postman in order to track down the exact path. If the problem is rendering out to the browser, I use both VS Code and the browser console in order to find the exact issue.

There is also the human factor. By asking a colleague or a site like stackoverflow.com, I can ask more specific questions about my particular issue.

Using these (and sometimes in combination with each other) I can generally track down what’s causing me trouble.

--

--