Currently two syntaxes are supported:
AMP.setState(foo='bar')
AMP.setState({foo: 'bar'})
(1) uses the standard action key-value system while (2) delegates the parsing of the object literal to amp-bind. IMO we should remove (1) since it's less powerful and not consistent with Bind expression syntax. Only having one syntax would make the API cleaner and less confusing.
We'd first need to fix all of the example code in the amphtml repo and ampbyexample.com.
/cc @ericlindley-g