Comments (4)
Hi, thanks!
The reason why we can't use such as adding background what we want is Texture's layout spec is only for layout information. We must avoid to create a node inside returning layoutspec.
This issue also helps you to understand.
#21
from textureswiftsupport.
Or even if you mean that operator sets the background color of the node, that's not also a good practice.
While creating layout spec, as possible, we should keep the state of the nodes.
from textureswiftsupport.
got it, there's that technical limitation I was looking for. apologies for not searching the issues before creating a new one, and thank you for your work building this!
from textureswiftsupport.
actually, as I'm looking through your demo, would it not be possible to wrap onDidLoad
in a special modifier to just change the background color? like you've done here:
https://github.com/TextureCommunity/TextureSwiftSupport/blob/96eabb9681c2a7c7cf3f55af6348c828fd567d7a/Demo/InstagramPostCellViewController.swift#L103-L105
why is it a best practice to enforce that operators only modify the layout, not node style/state? does modifying state/style cause a re-render?
from textureswiftsupport.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textureswiftsupport.