React JS and state management issues

  1. Having a generic template in creating text and image layouts, how to create dynamic states for text and image (e.g., animation) attributes with a scroll position in the visible view window?
  2. An added problem with React JS and state variable is that while one could initialize an empty state array, adding dynamically variables to this state array, creates a referencing problem with the variable state changes in the array, instead for the template, I’ve found the workaround requiring a static set of state variables for a one size fits all approach to the blog post component.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store