summary
Initially proposed in #15647, this I2I is about allowing amp-list to render from amp-state for its first render, instead of only subsequent ones. In order to support this, we can create a new uri scheme, amp-state:. The path that follows would then refer to an amp-state path.
For example,
<amp-list src="amp-state:data.path">...</amp-list>
In the above example, we would expect the value at data.path to contain the exact same json that a properly configured server would have returned. This means json with an array at items, as well as an optional load-more-src. Note that both of those required keys would still be configurable via amp-list attributes (items, and load-more-bookmark respectively).
motivation
- Reduces the amount of effort required for publishers to show stale data, since they don't need to duplicate the template rendering logic on the server.
prototyping status
See #26284, for a prototype of this feature behind a flag.
summary
Initially proposed in #15647, this I2I is about allowing
amp-listto render fromamp-statefor its first render, instead of only subsequent ones. In order to support this, we can create a new uri scheme,amp-state:. The path that follows would then refer to an amp-state path.For example,
In the above example, we would expect the value at
data.pathto contain the exact same json that a properly configured server would have returned. This means json with an array atitems, as well as an optionalload-more-src. Note that both of those required keys would still be configurable viaamp-listattributes (items, andload-more-bookmarkrespectively).motivation
prototyping status
See #26284, for a prototype of this feature behind a flag.