I have a
scratch wrapper I wrote for React as an alternative to
for controlled components. The idea being that it’s nice to keep all data in
Redux, but it’s kind of a pain in the butt to do so manually for every single
form, since generally you will also want that data to be cleared from the store
when the form is unmounted. My
ConnectWithScratch higher order component adds
lifecycle hooks on component mount and unmount to create and delete scratch
space for the component. As I’ve been using it, though, I’ve been discovering
some interesting edge cases.
I have a
I’ve been using React Router for a while now in a project and was running up against some frustration getting access to information that comes through the URL. I’m using Redux and React Redux for state management and Reselect for getting useful bits of information out of the state. The problem is that when I need to grab some information from the state based on the current route, it can be really tricky to get all of the information I need in the right places. After a good deal of head scratching and soul searching, I realized that for my purposes, the routing information belongs in the state, not encoded implicitly in the components that are rendered.
I finished reading this blog post by Saron Yitbarek and I had so many things I wanted to say that I decided to write it up in a post of my own. You will probably want to check hers out so that you know what I am responding to here. As a disclaimer, I do my best to respond to what she is saying, but a lot of this is just stuff I like to say, so might be tangential…
I recently started playing around with React DnD to implement some drag and drop sorting on an app I’m working on. The examples provided are built using a lot of the new syntax in ES6, as well as having a good deal of what might be considered more
properstructuring for a React app, so it was challenging for me to parse out the critical bits for React DnD to function. To further my own understanding, I stripped out all of the ES6 syntax and some of the non-essential code in order to get the most basic drag and drop implementation up and running.
Second blog post seems like a good time to write about my experience setting up a blog using Middleman while it’s still fresh in my mind. Middleman is a static site generator, a la Jekyll, and I’m using their blogging extension. If you’re starting fresh, then I would recommend the thoughtbot post on how to get a blog set up with their bourbon, neat, and bitters SASS libraries, as this is somewhat an extension of their post. I’ll talk about setting up layouts, as well as coping with some minor styling issues I ran into.
I recently settled into a new apartment after a grueling two month search, so I thought I’d share some of my experience looking for an apartment during the worst time of the year for it. It can be a harrowing time, and to be honest, if you can put it off until a better time of year, I’d recommend it. Prices will be lower and the competition for the affordable places will be considerably less fierce. Regardless of when you’re on the hunt, though, here are some tips that might help you get through it a little easier.