Reactjs React导入多个函数
有没有办法让我做这样的事Reactjs React导入多个函数,reactjs,Reactjs,有没有办法让我做这样的事 import {test,test1,test3} from 'react' 这将导入在somecomponent中标记为export的所有功能和组件,并将它们组合为R import * as R from 'somecomponent'; 或 这将从somecomponent导入这些函数。它们应该像这样出口 import { test, test1, test2 } from 'somecomponent'; 然后你可以像下面这样称呼他们: export con
import {test,test1,test3} from 'react'
这将导入在somecomponent
中标记为export
的所有功能和组件,并将它们组合为R
import * as R from 'somecomponent';
或
这将从somecomponent
导入这些函数。它们应该像这样出口
import { test, test1, test2 } from 'somecomponent';
然后你可以像下面这样称呼他们:
export const test = () => {};
export const test1 = () => {};
export const test2 = () => {};
从“react”导入*作为R怎么样!!!你的丈夫
import { test, test1, test2 } from 'somecomponent';
export const test = () => {};
export const test1 = () => {};
export const test2 = () => {};
test();
test1();
test2();