Unused Ports
Update src/Main.elm and then use yarn run build to refresh main.js
.
Ports Available
Elm Output
Findings
- It does not matter whether the port is returned directly or via other function calls.
- Being exposed from a module has no effect on its own.
- A port is only made available when:
- An outgoing port is returned from an application's
update
.
- An incoming port is returned from an application's
subscriptions
.
- When there are no available ports,
app.ports
is undefined
.
- There is no difference with
--optimize
.