show will error if you pass nil to the first arg. To combat this, you must pass Source or Source(nil).
While not accepting a primtive non-nil value is valid due to the type checkers limitations- I think show should accept nil, to improve DX by reducing bloat props, for example, prop Selected may be true or false, but you can pass a falsy value by passing no prop at all, so prop.Selected == nil, which you can then pass into show.
show will error if you pass
nilto the first arg. To combat this, you must passSource or Source(nil).While not accepting a primtive non-nil value is valid due to the type checkers limitations- I think
showshould accept nil, to improve DX by reducing bloat props, for example, propSelectedmay be true or false, but you can pass a falsy value by passing no prop at all, soprop.Selected == nil, which you can then pass intoshow.