当我试图用数组中的项来查找对象的键时,我得到了一个错误... Element implicitly has an 'any' type because type has no index signature 我在这个沙盒https://codesandbox.io/s/affectionate-pasteur-kj5h0中重新创建了它 我拍摄了一张屏幕截图,以防由于任何原因在这里显示错误https://i.imgur.com/sq6Yqez.png
请原谅我在这里说了一些小菜一碟,但是我需要一些帮助来动态地调用一个React组件。例如,我有三个组件<ComponentA />、<ComponentB />和<ComponentC />。但是,我想动态地呈现它们;
var comp = /*some function that brings a string here*/; // this variable 'comp' could将这个comp变量作为一个react</e