How to set camera position dynamically?

Hi, I’m not much familier with threejs. I’m facing a problem now. I have a model I’ve loaded. The position of the camera is fixed with some values for this specific model. But what I want is to set dynamic camera position for different model. Suppose I have 2 models and I’m selecting a model from my react component. For model 1 I have fixed the position of the camera. But when I select model 2 the model and the camera position is looking horrible because the camera position was set for the model 1 and model 1 and 2 is different in height and width. How can I resolve this problem? I’m using react three fiber. Thanks