Trump deserves credit here but let's be honest, it didn't start with him. He inherited a good economy from Obama. Trump deserves credit for continuing the trend.
Obama enjoyed an improving economy because it is a bigger thing than a President.
But his efforts actually caused the slowness of recovery with regulatory interference,
eg, opposing Fannie Mae's & Freddie Mac's renegotiating troubled loans, forcing
lenders to foreclose upon troubled loans instead of renegotiating them, inhibiting
originating new loans to replace costlier old ones.
He really scrooed the pooch in this area.
The economy is also bigger than Trump, so improvement could be happening
in spite of him. We must look at policies that each effected, & judge the merit
& consequences of those.