jasonsalzman / react-add-to-calendar

A simple, customizable, and reusable Add to Calendar button component for React
https://jasonsalzman.github.io/react-add-to-calendar/
MIT License
180 stars 124 forks source link

implicitly has an 'any' type #22

Open TomBak5 opened 6 years ago

TomBak5 commented 6 years ago

hy,

excuse me but your documentation is just confusing. I get nothing but errors. No information about supporting (just dependency) so it is very difficult to solve problems.

  1. For the line import AddToCalendar from 'react-add-to-calendar'; I get error: Could not find a declaration file for module 'react-add-to-calendar' ... implicitly has an 'any' type

there was similar error with import React from 'react'; too, but I solved it by installing @types/react and changing the line to import * as React from 'react'. Did I do right?

  1. extends React.Component causes me constructors for derived classes must contain a 'super' call. Can you help me?

  2. how about render() { return <AddToCalendar event={this.state.event}/>; }; ?

where should be return "caught"? Do we need to use render() anywhere?