You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The migration away from the use Tesla macro is an important step forward for the Tesla library. If you have any questions, please share them here.
Why are we deprecating the macro?
Improved Clarity: The macro approach can be confusing for newcomers as it hides implementation details behind magic. The new approach makes the client construction explicit and easier to understand.
Better Testing: With explicit client creation, it's easier to inject different middleware stacks or adapters during testing. You have full control over the client configuration.
Runtime Configuration: The macro approach makes it harder to configure clients at runtime since the middleware stack is defined at compile time. The new approach allows for dynamic client configuration based on runtime conditions.
Middleware Reusability: By defining middleware as a regular function returning a list, you can easily share and compose middleware configurations across different modules.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The migration away from the
use Tesla
macro is an important step forward for the Tesla library. If you have any questions, please share them here.Why are we deprecating the macro?
Improved Clarity: The macro approach can be confusing for newcomers as it hides implementation details behind magic. The new approach makes the client construction explicit and easier to understand.
Better Testing: With explicit client creation, it's easier to inject different middleware stacks or adapters during testing. You have full control over the client configuration.
Runtime Configuration: The macro approach makes it harder to configure clients at runtime since the middleware stack is defined at compile time. The new approach allows for dynamic client configuration based on runtime conditions.
Middleware Reusability: By defining middleware as a regular function returning a list, you can easily share and compose middleware configurations across different modules.
Beta Was this translation helpful? Give feedback.
All reactions