Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
Trying to import an exported interface in React, but React cannot find it

I have two files in the same directory: CosmWasmContext.js, and CosmWasmHooks.js.

This is in my CosmWasmHooks.js file:

export interface ISigningCosmWasmClientContext {
    ...
}

export const useSigningCosmWasmClient = (): ISigningCosmWasmClientContext => {
    ...
}

I would like to use both the interface and function in my CosmWasmContext.js file. I am able to only import the function useSigningCosmWasmClient, but not the interface.

These are the ways I have tried to import from CosmWasmHooks:

import { useSigningCosmWasmClient,ISigningCosmWasmClientContext } from './CosmWasmHooks'
import { useSigningCosmWasmClient} from './CosmWasmHooks'
import { ISigningCosmWasmClientContext } from './CosmWasmHooks'
import { useSigningCosmWasmClient} from './CosmWasmHooks'
import ISigningCosmWasmClientContext from './CosmWasmHooks'

I can import and use useSigningCosmWasmClient without problems. The only issue is with the ISigningCosmWasmClientContext interface.

Does anyone know why I might have such strange problems importing? I have never run into this problem before.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!