rem’s avatarrem’s Twitter Archive—№ 77,598

          1. …in reply to @polotek
            polotek Hard to get in a tweet - and you've got to assume I know what I'm doing - but here goes. Large data view where _most_ fields are laid out statically. But then there's a "metadata" array. Each element in the array is it's own component (i.e. a comp that returns a <Tr>). —
        1. …in reply to @rem
          polotek —all the metadata is editable, but only contains a key and value (so pretty simplistic). The data is coming via a graphql query too (via swr). Upon editing, and debouce, the metadata changes are sent as mutations (there's no save button). Also has delete button and add row—
      1. …in reply to @rem
        polotek — just trying to keep the data from blurring the input field was hard. i.e. mutation triggers, causes data being passed in to mutate, triggers re-render and blur happened. It was also triggering mutation events right away, which I solved by doing this (screen).
        oh my god twitter doesn’t include alt text from images in their API
    1. …in reply to @rem
      polotek In short. It took me a stupidly long time to do something that's relatively trivial for my experience. Lots of hoops to balance to prevent rerenders and focus loss, when in jQuery land (or sans) I'd put an input listener on the top and do simple ajax hits.
  1. …in reply to @rem
    polotek (I don't expect an solution to doing this, but I feel like it's relatively stupid little tasks seem overly complicated - I have the same problems in Vue/Nuxt land, like "show a 500 page when I know there's an error" is far from obviously done).