gokcan/react-shimmer

Failed to compile after installing react-shimmer on a CRA typescript app

ronnaf opened this issue · 4 comments

TypeScript error in /node_modules/react-shimmer/dist/index.d.ts(2,1):
Declaration or statement expected.  TS1128

    1 | export { default } from './Image';
  > 2 | export type { ImageProps } from './Image';
      | ^
    3 | export * from './loaders';
    4 | export type { ShimmerProps } from './loaders/shimmer/Shimmer';
    5 | export type { BreathingProps } from './loaders/breathing/Breathing';

I used it like:

import Image, { Shimmer } from 'react-shimmer'

function App() {
  return (
    <div>
      <Image
        src='https://source.unsplash.com/random/800x600'
        fallback={<Shimmer width={800} height={600} />}
      />
    </div>
  )
}

Same issue

Same issue

@ronnaf, @GuiSelair, @JokubasTolocka could you install the latest version of react-shimmer?

I have greatly improved the module build process: #90

@gokcan yes! thank you very much :)