Skip to content

Instantly share code, notes, and snippets.

@IanShoe
IanShoe / test.js
Created February 17, 2016 15:39
pdf error being eaten
var Parser = require('pdf2json/pdfparser');
var pdfParser = new Parser();
function handler(err, data) {
if (err) {
console.log('Normal Error Here');
} else if(data) {
console.log('We have data, we will now continue with our app');
throw new Error('Something about our app itself blows up and we should see this bubble up');
}
@IanShoe
IanShoe / vue-vs-react.md
Created February 9, 2016 16:31
Vue vs React

Given the UI, we've determined that a Client Side tool maintaining data state and binding would be advantageous. This is only to augment singular pages, even just parts of a page, so we don't want full blown frameworks and will likely utilize many rails UI helpers.

Doing a quick comparison with Vue.js and React.js leads me to believe that both are very capable at accomplishing this and both are fairly lightweight. Factually, there are only 3 real points that I find would impact the decision on which to choose.

  1. React.js uses .jsx files which require a compilation step during the build phase to convert them into proper .js and html templates. Because of this, there would be a little more ramp up in order to get started with this ecosystem. This gem should provide what's needed and make it pretty quick however I'd probably need to pull someone in and help me understand where to put these and how to configure