steos / reactcards

devcards for react
BSD 3-Clause "New" or "Revised" License
486 stars 29 forks source link

Inspect more stuff #8

Open jhicken opened 8 years ago

jhicken commented 8 years ago

The inspect prop only shows component state. It my case it would be more valuable to have inspect show props.

So I propose 2 props:

inspectState inspectProps

steos commented 8 years ago

inspectState would be really cool to have. I'm not sure about inspectProps though, because the way it works now props should either come from the state parameter that is passed to the function that renders the component or be constant. Unless you use globals. Or am I missing something? It would be great if you could give a concrete example.

a-c-m commented 8 years ago

I agree, having a card that shows the data in, as well as the internal state would be very useful. I also thought a card showing/detailing the props and their types/schema would also be very nice to see.