Working With React - brownfield-team/anacapa-github-linker GitHub Wiki
When integrating a new "top level" React component, to get it to appear, you use this in the erb file:
<%= react_component("CourseNavBar",
props: {current_path: request.env['PATH_INFO'], roster_path: course_path(@course),
project_teams_path: course_project_teams_path(@course),
org_teams_path: course_org_teams_path(@course),
repos_path: course_repos_path(@course),
github_repos_path: course_github_repos_path(@course),
slack_path: course_slack_path(@course),
jobs_path: course_jobs_path(@course),
edit_path: edit_course_path(@course),
create_team_repos_path: create_repos_course_org_teams_path(@course),
create_teams_path: create_teams_course_org_teams_path(@course),
events_path: course_events_path(@course),
can_edit: can?(:update, @course)
},
prerender: false) %>
Then, you must also register it in app/javascript/packs/react-bundle.js
You only have to register components that you are directly calling with <%= react_component("ComponentName", ... %>
; the other
components called from ComponentName
don't have to be registered in this way.