Pricing Blog

Component naming

  • nathandh.-1309729012964261928

    nathandh

    7 months ago

    What toddle calls component “attributes, other typical web tech (like React generally or Webflow specifically) calls “properties. When I see “attributes, I think data-attributes every time, which is not the same thing.

    Why the difference in naming convention?
  • lucasg-1309735040535756842

    Lucas G

    7 months ago

    toddle isn’t react though. Attribute probably originally came from HTML attributes
  • Component attributes behave similarly
  • It would be React which deviated from that naming if anything lol. Props are similar in use
  • nathandh.-1309743137291370496

    nathandh

    7 months ago

    That’s what I mean though — HTML attributes are very different from what toddle calls attributes. And what it calls attributes, everything else calls properties. So curious why the inversion
  • lucasg-1309747934987943968

    Lucas G

    7 months ago

    When adding HTML attributes you do it in the attributes tab
  • lucasg-1309748210964627468

    Lucas G

    7 months ago

    Attributes are used to pass data into a component which is what HTML attributes do
  • lucasg-1309748694274543617

    Lucas G

    7 months ago

    React props and toddle attributes do go further in that they are more flexible of course but that's how I relate them
  • I'm not part of the toddle team though so it's just my guess