Skip to content

component hierarchy

Oguzhan Cakmak edited this page Oct 22, 2017 · 2 revisions

Functional Component Hierarchy

  • Root
    • App
      • NavBar
      • Feed
      • SideBar

NavBar

  • NavBar
    • Components:
      • LinksContainer
      • SearchBarContainer
      • QuestionModalContainer

Note: All other components are rendered inside of MainPage

Feed

  • QuestionIndexContainer + QuestionIndex

    • Route: /#/questions
      • State: questions, answers, comments users
        • Components:
          • QuestionIndexItem
            • State: questions[:id], answers[:id], users[:id], comments[:id] ui
  • QuestionShowContainer + QuestionShow

    • Route: /#/questions/:questionId
      • State: questions[:id], users[:id], ui
  • QuestionFormContainer + QuestionForm

    • Route: /#/questions/new
      • State:errors.questionForm

SideBar

  • SideBarContainer
    • Route: /#/questions
      • State: questions, answers, comments users
        • Components:
          • QuestionIndexItem
            • State: questions[:id], answers[:id], users[:id], comments[:id] ui

Session

  • SessionFormContainer + SessionForm
    • Route: /#/login and /#/signup
      • State: errors.login
Clone this wiki locally