Make a simple File Tree for Electron using ES6 and Node

Bonus: Make it work with React, too.

Working in Electron can be a blast, but sometimes the functionality you want just isn’t fully there. Electron relies on you utilizing the ‘fs’ (File System) node module for interacting with the native file system — which lacks some of the expected depth that you might be used to if you’re coming from languages like C# or Java for interacting with local directories and files.

This article is going to focus on creating a simple ES6 class that you can use to have an object…