yoshuawuyts / microcomponent

Smol event based component library
MIT License
35 stars 11 forks source link

docs: render takes an object of props #10

Closed timwis closed 7 years ago

timwis commented 7 years ago

With the former syntax I was doing component.render(fields, rows) but in fact I needed to do .render({fields, rows}). Not sure which is intended, but this PR at least updates the docs to reflect that.

yoshuawuyts commented 7 years ago

The foo([bar]) syntax in the docs is to signal that the arguments are optional. Not sure we're doing a good job at it, but think it's like a convention. Should probs also mention it in the text hmmm

timwis commented 7 years ago

Oh yeah... I thought it was the one with additional args. May have just been early in the morning.