DEV Community

[Comment from a deleted post]
Collapse
 
chrstnfrrs profile image
Christian Farris • Edited

Why not create the NUXT app with create-nuxt-app?

Collapse
 
ajcwebdev profile image
ajcwebdev • Edited

That's a good question, the honest answer is that when I start a project like this I just go to the first page of the docs and go from there. The Nuxt docs start by having you build out an application from scratch before using create-nuxt-app.

I also don't write these articles to necessarily present the most efficient or production ready way to build a project. I aim to help the reader build a mental model of a framework and how it can be adapted to their use case. For my own learning style I need to build a thing from the ground up before I can appreciate the tools that abstract all of it away.

Kent C. Dodds has a similar philosophy and has written articles showing how to use React with just script tags in an index.html file. No one would ever do this with a real React app, but the point is to build up the mental model incrementally.

He boils React down to the most fundamental units and gets it running with just 11 lines of code.

<html>
  <body>
    <div id="root"></div>

    <script src="https://unpkg.com/react@16.13.1/umd/react.development.js">
    </script>

    <script src="https://unpkg.com/react-dom@16.13.1/umd/react-dom.development.js">
    </script>

    <script src="https://unpkg.com/@babel/standalone@7.8.3/babel.js">
    </script>

    <script type="text/babel">
      ReactDOM.render(
        <div>Hello World</div>,
        document.getElementById('root')
      )
    </script>
  </body>
</html>
Enter fullscreen mode Exit fullscreen mode

I appreciated that the Nuxt team also sees the value in this approach. For me the option to forgo create-nuxt-app was definitely a feature not a bug of the docs.