While this seemed like it might lead me in the right direction, it hasn't alleviated the issue I've been having which is this: the React element will render appropriately when its corresponding node is at the top of the page, but not when it is at the bottom. And I do not understand why.
After more tinkering with the React element, in which I removed a variable declaration and placed its reference into the render object directly, I was able to make the React element appear on the page, which is the "like" button below. Why this would make a difference, I have no idea. Whether an item is called directly or referenced via variable shouldn't matter.
Well, the damn thing works now. I don't know if this actually gets me any closer to understanding React. I do know, however, that div elements should have unique ids if you're going to refer to them by id. Which makes me wonder how I'll place one React element in multiple nodes if I ever feel the need to. So much more to learn. I am enjoying this process though. I'm learning bits of HTML and CSS in the process.
Comments? Questions? Follow me on twitter and drop me a line in response to this tweet:
Day 023: learned about dynamic and lazy loading of files, document.getElementById(), and the fuckery that is #React that left me in some confusion.https://t.co/jblD98YErQ#nonsensemod365 #thatCodingLife pic.twitter.com/IKKy4vN3HF— Joshua Alexander (@nonsensecodes) May 10, 2020