old_contents: # -*- coding: utf-8 -*-
  
  """
  This modules manages SSR rendering logic
  """
  import logging
  
  from django.conf import settings
  
  import requests
  
  
  logger = logging.getLogger(__name__)
  
  
  def load_or_empty(self, component, props):
      inner_html = ''
  
      try:
          inner_html = load(component, props)
      except requests.exceptions.RequestException as e:
          logger.error(e)
  
      return inner_html
  
  
  def load(self, component, props):
      req = requests.post(settings.REACT_RENDER_HOST, json={
          'componentName': component,
          'props': props
      })
  
      req.raise_for_status()
      return req.text
  
new_contents: # -*- coding: utf-8 -*-
  
  """
  This modules manages SSR rendering logic
  """
  import logging
  
  from django.conf import settings
  import requests
  
  from django_react_templatetags.templatetags.react_jsonfilter import (
      ReactRepresentationJSONEncoder
  )
  
  
  logger = logging.getLogger(__name__)
  
  
  def load_or_empty(component, props):
      inner_html = ''
  
      try:
          inner_html = load(component, props)
      except requests.exceptions.RequestException as e:
          logger.error(e)
  
      return inner_html
  
  
  def load(component, props):
      req_data = {
          'componentName': component,
          'props': props
      }
  
      req = requests.post(settings.REACT_RENDER_HOST, data=json.dumps(
          req_data, cls=ReactRepresentationJSONEncoder
      ))
  
      req.raise_for_status()
      return req.text
  
subject: Solve issue with data not correctly serialized in ssr request