I am using react and working with a basic export file containing contracts, here's how it looks like:
export const contract1 = ....
export const contract2 = ....
export const contract3 = ....
export const contract4 = ....
Then in another file, I import them with:
import * as P from "../filepath"
const function = (contractVariable)=>{
let contract = P.contractVariable;
...
}
I want to select the contract being exported according to the variable in my function. Is that possible?