Code Monkey home page Code Monkey logo

Comments (4)

muukii avatar muukii commented on June 15, 2024

@AndrewSB

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.

muukii avatar muukii commented on June 15, 2024

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.

AndrewSB avatar AndrewSB commented on June 15, 2024

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.

AndrewSB avatar AndrewSB commented on June 15, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.