Currently, you create multi argument filters by writing a function, that takes in the value from the template as its first argument.
That was very unintuitive for me and I think it would be a simpler and cleaner approach if we could just write functions that return functions. This would also allow for currying/method chaining.
This is just my opinion, please let me know how you would like it (or if this has been discussed already; I couldn't find that discussion).
What does the proposed API look like?
// current syntax
const format = (value, currency) =>
new Intl.NumberFormat("de-DE", {
style: "currency",
currency
}).format(value);
// new syntax
const format = currency => value =>
new Intl.NumberFormat("de-DE", {
style: "currency",
currency
}).format(value);
Sorry but this is subjective at best... adding an alternative syntax creates extra API surface, learning cost, maintenance cost, documentation complexity... I don't think this is worth adding.
What problem does this feature solve?
Currently, you create multi argument filters by writing a function, that takes in the value from the template as its first argument.
That was very unintuitive for me and I think it would be a simpler and cleaner approach if we could just write functions that return functions. This would also allow for currying/method chaining.
This is just my opinion, please let me know how you would like it (or if this has been discussed already; I couldn't find that discussion).
What does the proposed API look like?