codyswanner / Meme-Cataloger

Learning ReactJS and Django while building something that I want to use
1 stars 1 forks source link

useContext for imageTags? #54

Closed codyswanner closed 4 months ago

codyswanner commented 4 months ago

There is a lot of passing imageTags for any particular image to a lot of places, from MainContentArea all the way down to AddTagPopper and the Autocomplete in TagPopperContent. Instead of passing this as a prop through all these levels, would it be better to use a React context, like is already in place for appData?

(This issue is not for implementation of this idea, merely consideration of it. If this idea will be implemented, create a new issue to work off of.)

codyswanner commented 4 months ago

The same is happening with the imageId for any given image -- if this is implemented, collect this into the context as well. Maybe "imageContext" or something like that?