blog 408

Discuss something you learned in class today or this week.

This was our final week of class and I’ve been diving deep into my capstone project. One thing that has caught my attention is figuring out how to do certain basic things but in a React way. For instance, my app has a header and a footer on each page, but using React router allows me to use a single component to render this to “each page”… The challenge here was that I wanted to mark an active page as a different color in my menu. This would be super easy with standard CSS but because I was never actually re-rendering the header, I needed a different solution. While there are likely many ways to accomplish this, what I did was set a global state to the name of the page on each component load, then conditionally render the color of the svg in the menu based on that state. I ran into similar problems with my hamburger menu. While these challenges may seem like a reason to use vanilla JS with HTML and CSS, the benefits of React certainly outweigh these difficulties. The quick responsive sites and fun of JSX make React my new favorite choice for any project going forward.

Explain the use cases for and differences between bind, apply and call.

How do you handle code organization?

How do you handle dependency management?

What is React.cloneElement? And the difference with this.props.children?

Walk us through the process of the creation of an application or website you’ve built.

What are the differences between functional and imperative programming styles, and explain your preference, if any.