<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Amedge</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Amedge"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Amedge"/>
	<updated>2026-10-05T11:03:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=131386</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=131386"/>
		<updated>2019-12-18T22:00:39Z</updated>

		<summary type="html">&lt;p&gt;Amedge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application which can be cloned from [https://github.com/pratik-abhyankar/react-expertiza/tree/react-rails-integration here]. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found [https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md here].&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found [https://github.com/reactjs/react-rails here].&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from https://yarnpkg.com/lang/en/docs/install/#debian-stable as it is a necessity for foreman&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Migrated Components for React-Rails ==&lt;br /&gt;
&lt;br /&gt;
All of the components of the [https://github.com/expertiza/front-end Frontend Repository] have been migrated into our expertiza repository, to avoid constant lookback on the frontend repo. Currently, the migrated components which are functional are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Logout Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;StudentList Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Header Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Main Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SignupSheet Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PasswordForgotten Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ChangeHandleComponent&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;GradesViewMyScores&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Redirecting to the Rails frontend of Expertiza ==&lt;br /&gt;
&lt;br /&gt;
During the process of this migration, as stated above, we focussed on gradually moving from the initial rails frontend to the react front end. &lt;br /&gt;
&lt;br /&gt;
Hence, we did not change the previous routes. The older routes are still present in the configs/routes.rb file. Thus, whenever we click on any of the non working links, it will route us to the previous version of the link. Hence routes.rb has all the previously configured routes and if your server is on, you can access the previous front end.&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=131278</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=131278"/>
		<updated>2019-12-16T18:13:16Z</updated>

		<summary type="html">&lt;p&gt;Amedge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application which can be cloned from [https://github.com/pratik-abhyankar/react-expertiza/tree/react-rails-integration here]. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found [https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md here].&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found [https://github.com/reactjs/react-rails here].&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from https://yarnpkg.com/lang/en/docs/install/#debian-stable as it is a necessity for foreman&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Migrated Components for React-Rails ==&lt;br /&gt;
&lt;br /&gt;
All of the components of the [https://github.com/expertiza/front-end Frontend Repository] have been migrated into our expertiza repository, to avoid constant lookback on the frontend repo. Currently, the migrated components which are functional are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Logout Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;StudentList Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Header Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Main Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SignupSheet Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PasswordForgotten Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ChangeHandleComponent&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;GradesViewMyScores&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Redirecting to the Rails frontend of Expertiza ==&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=131277</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=131277"/>
		<updated>2019-12-16T18:10:38Z</updated>

		<summary type="html">&lt;p&gt;Amedge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application which can be cloned from [https://github.com/pratik-abhyankar/react-expertiza/tree/react-rails-integration here]. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found [https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md here].&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found [https://github.com/reactjs/react-rails here].&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from https://yarnpkg.com/lang/en/docs/install/#debian-stable as it is a necessity for foreman&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Migrated Components ==&lt;br /&gt;
&lt;br /&gt;
All of the components of the [https://github.com/expertiza/front-end Frontend Repository] have been migrated into our expertiza repository, to avoid constant lookback on the frontend repo. Currently, the migrated components which are functional are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Logout Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;StudentList Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Header Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Main Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SignupSheet Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PasswordForgotten Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ChangeHandleComponent&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;GradesViewMyScores&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=131276</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=131276"/>
		<updated>2019-12-16T18:10:17Z</updated>

		<summary type="html">&lt;p&gt;Amedge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application which can be cloned from [https://github.com/pratik-abhyankar/react-expertiza/tree/react-rails-integration here]. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found [https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md here].&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found [https://github.com/reactjs/react-rails here].&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from https://yarnpkg.com/lang/en/docs/install/#debian-stable as it is a necessity for foreman&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Migrated Components ==&lt;br /&gt;
&lt;br /&gt;
All of the components of the [https://github.com/expertiza/front-end Frontend Repository] have been migrated into our expertiza repository, to avoid constant lookback on the frontend repo. Currently, the migrated components which are functional are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Logout Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;StudentList Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Header Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Main Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SignupSheet Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PasswordForgotten Component&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ChangeHandleComponent&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;GradesViewMyScores&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129728</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129728"/>
		<updated>2019-12-03T20:24:33Z</updated>

		<summary type="html">&lt;p&gt;Amedge: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application which can be cloned from [https://github.com/pratik-abhyankar/react-expertiza/tree/react-rails-integration here]. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found [https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md here].&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found [https://github.com/reactjs/react-rails here].&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from https://yarnpkg.com/lang/en/docs/install/#debian-stable as it is a necessity for foreman&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129726</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129726"/>
		<updated>2019-12-03T20:23:54Z</updated>

		<summary type="html">&lt;p&gt;Amedge: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application which can be cloned from [https://github.com/pratik-abhyankar/react-expertiza/tree/react-rails-integration here]. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md.&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found at https://github.com/reactjs/react-rails.&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from https://yarnpkg.com/lang/en/docs/install/#debian-stable as it is a necessity for foreman&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129722</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129722"/>
		<updated>2019-12-03T17:01:44Z</updated>

		<summary type="html">&lt;p&gt;Amedge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application which can be cloned from https://github.com/pratik-abhyankar/react-expertiza/tree/react-rails-integration. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md.&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found at https://github.com/reactjs/react-rails.&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from https://yarnpkg.com/lang/en/docs/install/#debian-stable as it is a necessity for foreman&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129721</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129721"/>
		<updated>2019-12-03T17:00:44Z</updated>

		<summary type="html">&lt;p&gt;Amedge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application which can be cloned from https://github.com/pratik-abhyankar/react-expertiza/tree/react-rails-integration. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found [[ https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md | here]].&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found at https://github.com/reactjs/react-rails.&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from https://yarnpkg.com/lang/en/docs/install/#debian-stable as it is a necessity for foreman&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129720</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129720"/>
		<updated>2019-12-03T16:53:24Z</updated>

		<summary type="html">&lt;p&gt;Amedge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found [[ https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md | here]].&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found at https://github.com/reactjs/react-rails.&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from https://yarnpkg.com/lang/en/docs/install/#debian-stable as it is a necessity for foreman&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129719</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129719"/>
		<updated>2019-12-03T16:51:55Z</updated>

		<summary type="html">&lt;p&gt;Amedge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found [[ https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md | here]].&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found at https://github.com/reactjs/react-rails.&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from this [[ https://yarnpkg.com/lang/en/docs/install/#debian-stable | link ]] as it is a necessity for foreman&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129718</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129718"/>
		<updated>2019-12-03T16:50:19Z</updated>

		<summary type="html">&lt;p&gt;Amedge: /* React-Rails Integration Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found [[ https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md | here]].&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found at https://github.com/reactjs/react-rails.&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install yarn from the link as it is a necessity: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Architecture_and_Setup&amp;diff=129660</id>
		<title>Architecture and Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Architecture_and_Setup&amp;diff=129660"/>
		<updated>2019-11-26T19:59:35Z</updated>

		<summary type="html">&lt;p&gt;Amedge: Created page with &amp;quot;== Introduction ==  This project is about creating a new front-end for Expertiza, which is a RoR MVC application, by separating the view from the MVC architecture. For separating...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
This project is about creating a new front-end for Expertiza, which is a RoR MVC application, by separating the view from the MVC architecture. For separating the view, the existing RoR application needs to be modified by creating APIs that will help the new front-end interact with the back-end. These APIs will render JSON objects instead of views that are rendered in the original application, thereby creating RESTful services that will enable the new front-end to procure information. ReactJS is used for creating the new front-end, with Redux used for state maintenance. For HTTP requests to the back-end services, axios, a promise based HTTP client is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:RailsArchitecture.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ReactRedux.png]]&lt;br /&gt;
&lt;br /&gt;
== Setup == &lt;br /&gt;
&lt;br /&gt;
=== React Application ===&lt;br /&gt;
&lt;br /&gt;
The React application is created following https://github.com/facebook/create-react-app. This will create a structure like the one shown below,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
my-app&lt;br /&gt;
├── README.md&lt;br /&gt;
├── node_modules&lt;br /&gt;
├── package.json&lt;br /&gt;
├── .gitignore&lt;br /&gt;
├── public&lt;br /&gt;
│   ├── favicon.ico&lt;br /&gt;
│   ├── index.html&lt;br /&gt;
│   └── manifest.json&lt;br /&gt;
└── src&lt;br /&gt;
    ├── App.css&lt;br /&gt;
    ├── App.js&lt;br /&gt;
    ├── App.test.js&lt;br /&gt;
    ├── index.css&lt;br /&gt;
    ├── index.js&lt;br /&gt;
    ├── logo.svg&lt;br /&gt;
    └── serviceWorker.js&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One of the most agreed upon structure for a React project is to have a &amp;lt;b&amp;gt;components&amp;lt;/b&amp;gt; directory for storing your Components. Having a single directory for all your components is the most intuitive and logical one. Therefore, our React Application has a directory for components where you can find all the components, thereby having related code as close as possible. &amp;lt;br/&amp;gt;&lt;br /&gt;
One of the other things to have is an &amp;lt;b&amp;gt;assets&amp;lt;/b&amp;gt; folder, where you can store all the dependencies shared by your application, such as SASS mixins, images, etc. This could be used as a single location for storing files that are external to the project itself. It is of great convenience to group these related, non-JavaScript files together.&lt;br /&gt;
Another important addition is the &amp;lt;b&amp;gt;utilities&amp;lt;/b&amp;gt; directory, which is a folder full of helper function that are used globally. This helps in keeping the code DRY by exporting repeated logic to a singular location and importing it where used. This directory goes by the name &amp;lt;b&amp;gt;shared&amp;lt;/b&amp;gt; in our project. With these things present, the directory structure of client looks like the following,&lt;br /&gt;
&lt;br /&gt;
[[File:directoryStructure.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Redux Middleware ===&lt;br /&gt;
&lt;br /&gt;
Libraries like React are built with a way for components to internally manage their state without any need for an external library or tool. But, as the application grows bigger, managing states shared across components becomes tedious. For instance, to share data among siblings, a state has to live in the parent component. A method for updating this state is provided by the parent component and passed as props to these sibling components. If the state has to be shared between components that are far apart in the component tree, the problem worsens. This is why we use Redux, which makes it easier to maintain these states. Redux is a central store that holds the entire state of the application, which can be accessed by every component of the React app, without having to send down props from one component to the other.&lt;br /&gt;
&lt;br /&gt;
For setting up Redux in the React application, three packages are required, viz, redux, react-redux and redux thunk.The three building parts of Redux are actions, store and reducers. Actions are events by which you can send data from your application to the Redux store. Reducers are pure functions that take the current state of the application, perform an action and return a new state. The store holds the state of the application. As the application grows, we will have multiple reducers, each managing independent parts of the state. We use configureStore to combine all such reducers into a single reducer function.&lt;br /&gt;
&lt;br /&gt;
The resulting directory structure of the Redux store is as follows,&lt;br /&gt;
&lt;br /&gt;
[[File:Redux.PNG]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;b&amp;gt;ActionType.js&amp;lt;/b&amp;gt; contains string literals for our action types. These strings are exported as an object literal which can then be imported into your reducers and action creators instead of hard-coding them. In &amp;lt;b&amp;gt;index.js&amp;lt;/b&amp;gt; we re-export our operations, reducers and action types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rails API ===&lt;br /&gt;
&lt;br /&gt;
The Rails back-end code-base now has a separate namespace called &amp;lt;b&amp;gt;api/v1&amp;lt;/b&amp;gt; for the new API only controllers. HTTP requests from the front-end will be received by these controllers, which in turn will return JSON objects to the calling services.&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129659</id>
		<title>React-Rails Gem Integration for ReactJS frontend</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=React-Rails_Gem_Integration_for_ReactJS_frontend&amp;diff=129659"/>
		<updated>2019-11-26T19:56:21Z</updated>

		<summary type="html">&lt;p&gt;Amedge: Created page with &amp;quot;== Introduction ==  This page contains documentation for integrating ReactRails framework to Expertiza application. The whole idea was to continue using the existing backend crea...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page contains documentation for integrating ReactRails framework to Expertiza application. The whole idea was to continue using the existing backend created in Rails and integrate a new ReactJS frontend into the application. The references described in the page can be found [[ https://github.com/shakacode/react_on_rails/blob/master/docs/basics/installation-into-an-existing-rails-app.md | here]].&lt;br /&gt;
&lt;br /&gt;
The challenge is to migrate front-end functionality incrementally from Rails to Javascript. The ReactRails framework facilitates this by allowing certain functionality to be kept in Rails while other functions are in React that is &amp;quot;mounted on&amp;quot; an .erb file.&lt;br /&gt;
&lt;br /&gt;
Currently, we have a separate code base created for ReactJS frontend which interacts with the backend in Rails via a separate set of controllers written in the Expertiza /app/api/v1 folder. This is because ReactJS applications make AJAX calls using Axios to the backend which require to transact in JSON data and not use erb views. This approach not only violates the DRY principle, but also requires us to maintain 2 Expertiza development repositories 1 for frontend and the one already in use which has backend and erb views. As a solution to this, React-Rails is a framework that can be installed as a gem, which will help us to create and integrate React components into our existing Expertiza code base in Rails. Official React-Rails repository and documentation can be found at https://github.com/reactjs/react-rails.&lt;br /&gt;
&lt;br /&gt;
==  React-Rails Integration Steps ==&lt;br /&gt;
&lt;br /&gt;
Following steps describe the ReactRails integration into Expertiza step-by-step as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Note:''' Detailed instructions can be found at the above link. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the gems 'react_on_rails' and 'webpacker'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem &amp;quot;react_on_rails&amp;quot;, &amp;quot;11.1.4&amp;quot; # Update to the current version&lt;br /&gt;
gem &amp;quot;webpacker&amp;quot;, &amp;quot;~&amp;gt; 3&amp;quot; # Newer versions might be supported&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the below commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bundle exec rake webpacker:install&lt;br /&gt;
$ bundle exec rake webpacker:install:react&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Generate a simple sample React Component 'hello_world' to check if everything is installed correctly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rails generate react_on_rails:install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Starting a server for this change requires the foreman gem, you can install it by 'gem install foreman'&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Server can be started by:&lt;br /&gt;
&amp;lt;pre&amp;gt;foreman start -f Procfile.dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Issues Faced ==&lt;br /&gt;
&lt;br /&gt;
Issues were faced during the integration process, which will be incrementally added below, since the development is in progress, and the page will be updated with the progress:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version compatibility: The react-rails gem requires Rails version 5.1+, but as of now we managed to get it working with Rails 4.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mini-racer gem: This gem's latest version is not supported with Expertiza's Rails version 4, and hence we had to use the older version or completely skip using it.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current Status ==&lt;br /&gt;
&lt;br /&gt;
As of now, the application supports both JS (the new front-end) and the existing front-end. The idea is to progressively remove older front-end as we add bits and pieces of the newer front-end. Incremental version upgrade for rails is also under plans to get it to the latest version to avoid any clashes with the front-end migration. Currently the status is on checking if the props can be passed to avoid calls via ajax, hence reducing a huge dependency which will help us get rid of axios calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The JS code is mounted on to the expertiza.html.erb file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The data is fetched from the controllers after the respective action.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This data is then converted into props, which are parameters that are passed on to the React Components.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These props, which are passed to the view (expertiza.html.erb) from the controller are used by the react code in the view file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The render() function, which is the base function to display the content, then renders the props in its appropriate section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Front-End/Back-End&amp;diff=126674</id>
		<title>Front-End/Back-End</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Front-End/Back-End&amp;diff=126674"/>
		<updated>2019-10-29T23:45:28Z</updated>

		<summary type="html">&lt;p&gt;Amedge: Added a new title for a new page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Architecture and setup]]&lt;br /&gt;
&lt;br /&gt;
* [[Login Component]]&lt;br /&gt;
&lt;br /&gt;
* [[Student Tasks Component]]&lt;br /&gt;
&lt;br /&gt;
* [[Profile Component]]&lt;br /&gt;
&lt;br /&gt;
* [[Student Task View]]&lt;br /&gt;
&lt;br /&gt;
* [[React-Rails Integration]]&lt;/div&gt;</summary>
		<author><name>Amedge</name></author>
	</entry>
</feed>