goatslacker / goatslacker/alt

Documentation needs to be fixed

Open
#730 4 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.4k
Forks
312
PR merge metrics
No merged PRs in 30d

Description

The Getting Started guide is very misleading right at the beginning of one of the steps: http://alt.js.org/guide/actions/

Apparently, classes are not supported natively and only ES5 style works

This kind of unexpected result may put off some new users

If you run the **exact** code on the webpage (and there's not a whole lot to it), it returns:
```
TypeError: Class constructor LocationActions cannot be invoked without 'new'
at new ActionsGenerator (/node_modules/alt/lib/index.js:187:72)
at Alt.createActions (/node_modules/alt/lib/index.js:211:28)
at Object. (/actions/locations.js:9:22)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
```

It **needs** to say that the ES6 classes **need** to be transpiled into the ES5 format''

Granted that happens automatically in the build tools, but for first-timers, things appear broken (if we run them without transpiling)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.