Some examples in the README are showing this:
@:liveview
class CounterLive {
var count = 0;
function mount(_params, _session, socket) {
return {:ok, assign(socket, "count", count)};
}
function handle_event("increment", _params, socket) {
count++;
return {:noreply, assign(socket, "count", count)};
}
}
- This is using plain strings (
"count"). We shouldn't be using plain strings or at least they should be typed somehow.
- the method arguments are using the
_ prefix, which is a common idiom in Elixir, but not sure if we can abstract that away in Haxe? Investigate.
Another case of using plain strings that I should double check:
@:changeset
class UserChangeset {
@:validate_required(["name", "email"])
@:validate_format("email", ~r/\S+@\S+\.\S+/)
static function changeset(user, attrs) {
// Compiled to proper Ecto.Changeset pipeline
}
}
See if there's a better idiomatic Haxe typing strategy that I could use here.
Some examples in the README are showing this:
"count"). We shouldn't be using plain strings or at least they should be typed somehow._prefix, which is a common idiom in Elixir, but not sure if we can abstract that away in Haxe? Investigate.Another case of using plain strings that I should double check:
See if there's a better idiomatic Haxe typing strategy that I could use here.