datopian / datapackage-views-js

View library for datapackages and datapackage resources
12 stars 9 forks source link

Define proptypes #22

Open starsinmypockets opened 5 years ago

starsinmypockets commented 5 years ago

As a developer I want the proptypes declaration to guide my use of the component so I know what to pass to the component

Tasks

Acceptance

starsinmypockets commented 5 years ago

For instance, instantiating as follows:

<DataView key={i} name="Foo" datapackage={displayItem}  />

Throws

DataView(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.

Which is difficult to debug. Proptypes would clarify the reason for the failure to render.