After 2 days of searching, I didn't find any solution so, I just use react-hook-observer and threshold works as intended, I do not know whether or not it's react thing that threshold doesn't work but I couldn't find any answers online. So for now I am happy to share that everything works much better.