  We consider refractive index sensing with optical bounds states in the
continuum (BICs) in dielectric gratings. Applying a perturbative approach we
derived the differential sensitivity and the figure of merit of a sensor
operating in the spectral vicinity of a BIC. Optimisation design approach for
engineering an effective sensor is proposed. An analytic formula for the
maximal sensitivity with an optical BIC is derived.
  The results are supplied with straightforward numerical simulations.
