BlogPost_408

Rob Watkins
2 min readMay 8, 2020

Austin Coding Academy

Discuss in words something you learned in class today or this week. Hooks! I officially got my first component working with hooks. Feels good.

Explain the use cases for, and differences between — bind, apply and call. Bind is mostly used for pre-ES6 functions in order to bind them to “this”. The call method can be used on different objects. Same with apply, but apply and call take arguments in differently.

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

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

How do you handle code organization? Modules make everything easier for sure. Also, from the very very beginning I have been very careful and intentional about my indentation. It helps!

How do you handle dependency management? I just npm i — save and there they go into my package.json.

What is React.cloneElement? And the difference with this.props.children? cloneElement will clone and return a react element with the original element’s props and new props merged shallowly. It’s different from props.children in that it preserves the refs.

Walk us through the process of creation of an application or website you’ve built. Wireframe (a tiny bit), but I usually just hop in and start building. For my portfolio website I built it visually in HTML, then when I was satisfied I created a react app. I don’t think I’ll ever do it that way again. It would just be easier to begin in React.

What are the differences between functional and imperative programming styles, and explain your preference, if any. Functional aims to keeps functions as “pure” as possible, so that no matter the data passed through it will return a reliably similar result. Imperative more goes line by line to instruct the program exactly what to do with the data. Right now I’m definitely a bigger fan of functional. I like what I create to be as dynamic as possible, and functional is the best way to achieve that. Peace!

--

--