Writing Clean Bug-free Code in Quokka.js
Tags: webdev, debugging, javascript, tools
Published: 2018-04-24 14:48:08

---
title: Writing Clean Bug-free Code in Quokka.js
published: true
description: Writing Clean Bug-free Code in Quokka.js
tags: web development, debugging, javascript, tools
cover_image: https://cdn-images-1.medium.com/max/2000/1*I-6T_P4jc5YNKtjchhVhOA.jpeg 
---
<em>Contributed by [Matt Martin](https://www.linkedin.com/in/matt-martin-4b831b119/)</em>
&nbsp;
&nbsp;
Have you ever wanted to be able to test as you go while writing Javascript? Our developers here at [Hifyre](www.hifyre.com) are constantly trying to make their work more efficient by identifying tools that simplify the process. [Quokka.js](https://quokkajs.com/) lets you do just that by allowing rapid prototyping within the scope of your chosen editor.

What does that mean? Let us show you.

![alt text](https://cdn-images-1.medium.com/max/800/1*ukcsChGYEreBhhAksiYceA.gif)

If you are familiar at all with linters, Quokka.js has a lot of similarities. A linter is used to identify potential bugs, and even code that may be difficult to maintain. The best part about tools like these is that they get installed in the coding environment you are already using, so you don’t have to integrate any additional steps into your prototyping workflow. Your testing happens simultaneous to coding.

Where Quokka.js differs from a standard linter is in the live feedback functionality. Using live feedback, you can see results as you go. This presents a lot of potential opportunities as you code. For example, let’s say you wanted to experiment with a new library or function — using Quokka.js would allow you to run and test the output of that library without having to build a test environment. Better yet, the results are all reported inline, so the results are reported alongside the code that is generating them. Another good example of how useful live feedback is is time testing. With a simple addition of /*?.*/ following the line of code running a function, you can time how long that function takes to execute. This comes in handy when trying to decide on the most optimal way to write your code.

![alt text](https://cdn-images-1.medium.com/max/800/1*m-yQbA3eNATBdihUYyo5mA.gif)

Additionally, getting live feedback in your coding environment means that you still have access to all of your code files and imports. You don’t have to worry about configuring that for a test environment. You can test code snippets right within your editor. Quokka.js also differs from linters by offering live logging, live code coverage, live comments, and project file importing.

<h3>Are there other tools like this?</h3>
The answer is, not really. There are linters, but they don’t do nearly as much as Quokka.js. Alternatively there is another tool called Wallaby.js from the creators of Quokka.js, but there are quite a few differences between the tools. Wallaby.js is a more robust, test runner. Whereas Quokka.js was built to be a playground or a sandbox environment. Additionally, Quokka.js has a free community option that allows users to build their own plugins. This means that you can augment the features of Quokka.js to fit your needs and make the possibilities endless.
&nbsp;

---

We are hiring! Are you a full stack developer? [We want to here from you](https://hifyre.bamboohr.com/jobs/).