Update a choropleth layer by zoom level

Hey!
Is there a way to update a choropleth map when zooming in/out. Just like this from Mapbox:



Thank you