emilov2501 / use-ui

Simple React hooks, ready to use, written in TypeScript
MIT License
11 stars 0 forks source link

Request creating a hook useEach #7

Open emilov2501 opened 6 months ago

emilov2501 commented 6 months ago

I would like to be able to create an implementation of iterating over elements using the useEach hook, since there are problems specifying a unique key if the data is not from the server, there is a lot of boilerplate code to check that the list is empty and a for construct

sachyshyn commented 6 months ago

I don't think its good idea because react hook are not intended to handle jsx (or any markup). its better to implement several patterns like Compound Component or Render Props