在与TypeScript的反应中,我收集到您使用import * as React from 'react';导入。例如,如果我想使用useState和Fragment,我知道我可以只使用React.useState和React.Fragment。然而,是否有任何方法来破坏进口的那些?我知道没有TypeScript你会..。import react, { useState, Fragment } from
在一个类型记录项目中,我在一起使用typescript + rollup + rollup-plugin-node-resolve +React的useState,但是当运行rollup -c时,它会引发错误: ^Error: 'useState' is not exported by node_modules/react/index.j