It's completely reasonable to want to use an encoder for closed loop control on a stepper motor; they are not infallible and can sometimes misstep, especially when external forces might momentarily exceed holding torque.
You could implement full PID control like what is described in this article
(although the motor used here is a DC motor, you could do something similar using stepper CONTROL_MODE_RUN and setting a target velocity instead of a duty cycle).
You could alternatively program a simpler control loop that constantly keeps track of how many encoder pulses it should be seeing based on the target you gave it and make necessary corrections. For example, let's say you tell the motor to rotate 180°. From the math mentioned in my previous post, that would mean you should set target position to 42962. Now, the encoder you're using has 300 cycles per revolution. For a 180° rotation, we'd expect to see 150 quadrature cycles (or 600 pulses- some encoder interfaces measure cycles and others measure pulses). Assuming your encoder interface measures pulses, you could wait until your stepper moves to position 42962 and then compare the actual encoder position with the expected encoder position (600). If the actual encoder position ended up being 500, you could tell the stepper to move another 100 worth, which you could convert into degrees and then back into motor position with the same math. If you continue doing this, you should eventually reach a point where the target and actual encoder positions match and the motor can then stop.