Update asenvironment.md

This commit is contained in:
Hannah Troisi
2016-07-24 15:44:48 -07:00
committed by GitHub
parent e94c15ecc5
commit 7677a787e4

View File

@@ -8,7 +8,7 @@ nextPage: asrunloopqueue.html
`ASEnvironment` is an optimized state propagation system that allows the framework to distrubute a variety of important "evironmental" information up and down the node hierarchy.
Any object that conforms to the `<ASEnvironment>` protocol can propagate specific states defined in an ASEnvironmentState up and/or down the ASEnvironment tree. To define how merges of States should happen, specific merge functions can be provided.
Any object that conforms to the `<ASEnvironment>` protocol can propagate specific states defined in an `ASEnvironmentState` up and/or down the ASEnvironment tree. To define how merges of States should happen, specific merge functions can be provided.
Compared to UIKit, this system is very efficient and one of the reasons why nodes are much lighter weight than UIViews. This is achieved by using simple structures to store data rather than creating objects. For example, `UITraitCollection` is an object, but `ASEnvironmentTraitCollection` is just a struct.