Today I Learned

TIL, 2018-04-03, React Forms and Pandoc is back.


  • Pandoc man, hfill. Just check the resume generator lol.
  • Checking out light-table.
  • ExpressJS looks like Sinatra. This is something that I can probably look into.
  • Ruby: Feel free to raise NotImplementedError for inheritance things.

Musings, Front-end

  • Some random crap again about CSS and widths.
  • Did some media queries for the first time in 2 years? Lol.
  • Controlled components in React.
  • Draftjs is a thing!
  • Validations part: Researching for libraries.
  • Thinking about a form validation library for React. What to do…?
// Cool code sample from [Medium](
/For any field errors upon submission (i.e. not instant check)
//Note: In the below function, we kinda assume that the fields are valid and try to create post and handle errors if any later on.

const validateAndCreatePost = (values, dispatch) => {

 return new Promise((resolve, reject) => {
    dispatch(createPost(values)).then((response) => {
       let data =;
       if(response.payload.status != 200) {
          //let other components know by updating the redux` state
          reject(data); //this is for redux-form itself
       } else {
          //let other components by updating the redux` state
          resolve();//this is for redux-form itself

This project is maintained by daryllxd