Instawork / hyperview

Server-driven mobile apps with React Native
https://hyperview.org
MIT License
1.27k stars 66 forks source link

Support sending styles in Hyperview fragments #411

Open flochtililoch opened 2 years ago

flochtililoch commented 2 years ago

Right now, the styles definition is represented under the <styles> element, which by spec requires to be an immediate children of the <screen> element. Hyperview fragments by spec only return elements that can be appended to a element.

Proposal: define a new <fragment> element, modeled after the <screen> element, that will serve the purpose of nesting content and styles in two separate elements. For example:

Document Fragment
```xml