How to detect if any part of a phone has been replaced in React Native

I am seeking a method to detect if any hardware component of a mobile phone has been replaced, using either React Native or native code for both Android and iOS platforms.
Despite extensive research, I have not yet found a solution to achieve this functionality.