Check out example codes for "python selenium get html content". It will help you in understanding the concepts better.

Code Example 1

element = driver.find_element_by_xpath('//*')
element = element.get_attribute('innerHTML')

Code Example 2

element.get_attribute('innerHTML')

Learn ReactJs, React Native from akashmittal.com