samdenty / console-feed

Captures console.log's into a React Component 🔥
https://stackblitz.com/~/github.com/samdenty/console-feed
MIT License
649 stars 106 forks source link

`id` is missing from `Log` typing in documentation #128

Open kgrhartlage opened 9 months ago

kgrhartlage commented 9 months ago

The current documentation reads:

type Logs = Log[]

interface Log {
  // The log method
  method: Methods
  // The arguments passed to console API
  data: any[]
}

However, id seems to be supported and is used for the list key prop. This helped me resolve a bug in my application where we start to mutate the logs array once a max length is reached, while new logs are still coming in.

If desired, I can open a PR to update the README.