Coconut Creations


A student coding blog

Sorting in React

Sorting in React is important to understand as it is used often and creates a better experience for those interacting with the app. In my final project at Flatiron School I was able to implement sorting options in order to list nonprofits alphabetically. At first I was concerned with sorting the specific id attributes of the items on the list but with the .localCompare method I was able to reference string instead of integer values within my sort function.


React / Redux - What Props Where?

First, let me say that React and Redux are fantastic tools for JavaScript and open a lot of fun avenues for developers. I have personally enjoyed the developer tools Google Chrome offers as it makes debugging a sinch, especially when finding state and components! One of the simplest aspects of React that had me up reading into the wee hours of the night was truly understanding the difference between stateless components and stateful components. I know I’m a newb for no understanding what should be obvious seeing as its literally in the wording – stateful vs stateless – but when I began my project I was SO confused about how stateless components were being passed props. Let’s start with the basics; Stateful Components AKA Container Components: ``` class App extends Component { constructor() { super() this.state = { items: [] } } render(){ return ( <div> <h2><Todos items={this.state.items}</h2> </div> ) } }


JavaScript SPA

Building a single page application with JavaScript and Ruby on Rails has been a wild ride. Back when we learned Rails, I remember my cohort lead exclaiming how exciting it was that we had moved into building full stack applications and how far we’ve come from day one. At the time I didn’t fully understand the scope of what it meant to have moved into full stack programming but as we cruised through JavaScript the significance of it finally hit me. Since JS is completely frontend I finally understood how Rails provides the ability to build frontend views but can also be utilized strictly as a backend using, the ever so popular, JavaScript to build the ‘views’.


Rails Project

Well this one was a doozy to say the least. Learning rails has been really exciting but also very difficult. There are just SO many things rails can do. After working with vanilla Sinatra it seems like rails has an endless amount of magic available. It was only after writing my “Santa’s Workshop Rails App” that I was truly exposed to the magic. That being said, the magic wasn’t always helpful. There were so many times that I would add new code and break something somewhere else because I didn’t understand the full scope of how much magic was being created. It took a little while, but I began really understanding the methods used and where everything was going (aka flow).


Brewery Buddy CRUD App

I’ve made it to the second project in Flatirons curriculum and WOW does time fly! I feel like it was just yesterday I was brainstorming ideas for the CLI project and now I’m sitting down with a cup of tea and a finished Sinatra project just one month later. This project, like the last, was daunting as first but as I began to build my ‘RESTful’ routes everything seemed to fit together well and render pages nicely.