Category: React

  • Turn an array of objects into a table

    At work we use a number of javascript files that hold constants we can import to any of our builders or editors. The structure looks something like: So a fairly large array of objects which makes it easy to work with. With this data structure I needed to export a whole bunch of these objects…

  • Arrow function as class function in ES6

    If you’ve been using create-react-app and tried to build things on your own you might have done/seen/used handleClick = () => { // do thing on click } This comes from the Class properties transform plugin from Babel: https://babeljs.io/docs/plugins/transform-class-properties/ So if you try to build a project on your own you’ll need to include it…