Skip to content
#

update

Here are 920 public repositories matching this topic...

DamianPereira
DamianPereira commented Apr 27, 2021

I currently have a very big hook, with dozens of useStates, lots of them have empty arrays which trigger unncesary re-renders. But I don't know which is the one doing it each time wdyr logs it's output. I get:

Re-rendered because of hook changes: 
[hook useState result]
...diff

When would be very useful for me is:

Re-rendered because of hook changes:
[hook useState result] 
jku
jku commented Aug 20, 2021

tuf/ngclient/updater.py: Updater._persist_metadata():

    with open(os.path.join(self._dir, f"{rolename}.json"), "wb") as f:
        f.write(data)

this is not as safe as it should be (as file could be corrupted midway through). This should work:

  • write content to tempfile
  • use sslib_util.persist_temp_file() to move tempfile to correct filepath

Improve this page

Add a description, image, and links to the update topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the update topic, visit your repo's landing page and select "manage topics."

Learn more