How to create your first neo.mjs App

Tobias Uhlig
3 min readJan 6, 2020

--

Since there was some confusion after releasing the npx neo-app script (https://medium.com/@tobiasuhlig/release-announcement-npx-neo-app-190f114e73df), I would like to explain your 3 options more in detail.

  1. Get the neo.mjs repository running locally
    Take a look at: https://github.com/neomjs/neo/blob/dev/.github/GETTING_STARTED

    Step 6 of this guide will create an app inside neo/apps

    + You can work on the framework code as well
    + You can do a git pull to get the latest neo.mjs version
    + Feel free to add new example apps to the repository, so that others can review and help on the code base
    - It might not be easy to push your code base into a separate repository
  2. Use npx neo-app
    Take a look at:
    https://github.com/neomjs/create-app/blob/master/README.md

    The readme file gives you an overview of your script options

    + This is the easiest way to create a new neo.mjs app, since you can do it with the 1-liner npx neo-app
    + The script provides you different options like choosing an app or workspace name
    + You can easily add the output workspace directory to a new repository
    - Since neo.mjs is a required node_module you can not work on the framework code base here
    - You are responsible to manually update the neo.mjs version inside your package.json when new npm versions get released
  3. Fork the neo.mjs workspace
    Take a look at:
    https://github.com/neomjs/workspace

    The workspace repository contains the default output of the npx neo-app script.

    + You can use it in case there are any issues with npx neo-app in your environment
    + You can do a git update in case the default output structure of npx neo-app should change at some point
    + Doing a git update will also automatically adjust neo.mjs to the latest npm release version
    - You can not easily change the default app name: “MyApp” (you can change it, but then you need to be careful with doing the merge for a git update)
    - Since neo.mjs is a required node_module you can not work on the framework code base here

I hope this helped to make a choice, all 3 options do work and it depends on your preference which one to choose. Feel free to join our Slack Channel or Discord Chat in case you have questions.

So, what is neo.mjs?

neo.mjs is a webworkers driven UI framework, which just got released to the public on November 23, 2019.

In case you missed the release announcement:
https://codeburst.io/neo-mjs-the-public-release-announcement-1519255bc8f9

Most parts of the framework as well as the apps you build with it run within the App thread, resulting in an almost idle main thread with a blazing fast performance.

neo.mjs does not need to compile / transpile JS modules inside the development mode, so you can debug your real code without even needing source-maps.

The framework does not use templates to define your HTML output. Instead, JSON structures are in place which persist throughout the full component life-cycle.

This enables you to easily craft beautiful complex components.

Happy coding and an amazing new year!

--

--

No responses yet