To get the most from this chapter, we will set up a comfortable edit-compile workflow. We recommend placing two windows side-by-side in your editor. VSCode supports this functionality with the View | Split Editor command. On one side, load a Reason source file; on the other side, load the JavaScript output file (once it is initially compiled). Then in a terminal, run the following command:
bsb -w
The preceding command starts a build in watch mode, which automatically recompiles any parts of a project that are affected whenever you change any source code. In fact, watch mode is smart enough to also remove an outdated JavaScript output file whenever its corresponding Reason source file is deleted. The editor will also auto-reload the compiled JavaScript file whenever you save a Reason source file.
In VSCode, you can also open a terminal session directly below the files...