Wrapper
Also known as wrapper function · wrapper component
Code that surrounds another function, component, or API to adapt it or add behavior.
In the real world
An API wrapper calls fetch, checks response.ok, and parses JSON before returning data.
Also known as wrapper function · wrapper component
Code that surrounds another function, component, or API to adapt it or add behavior.
An API wrapper calls fetch, checks response.ok, and parses JSON before returning data.