gr icon indicating copy to clipboard operation
gr copied to clipboard

Add example of structs in state

Open nilsmagnus opened this issue 8 years ago • 1 comments

Hi Bjørn, thanks for an awesome library!

Could you add an example of how to insert/retrieve custom structs in state ?

E.g. a slice of custom struct( this is not working ):

people := c.State().Interface("people").([]Person)

nilsmagnus avatar Oct 20 '16 19:10 nilsmagnus

Yes I will -- once I figure out how to do it effectively.

This and related issues was what made take a little break from this -- hoping the GopherJS scene would somehow mature in this area, i.e. data transfers to and from server and to and from the Go and JS layer without costly serializing (which may be obvious in the Ajax sample).

I will pick up the hat and so some more thinking here.

bep avatar Oct 20 '16 21:10 bep