Questions tagged [react-on-rails]

112 questions
0
votes
1 answer

ActionController::ParameterMissing (param is missing or the value is empty: asset)

I am pretty new to programing so bare with me and I appreciate the help! I have been stuck on this for a while but when I try to add a record from a form my rails server gives me ActionController::ParameterMissing (param is missing or the value is…
0
votes
1 answer

Update controller action - how to redirect to the index page after rendering json?

My app is built with ruby on rails on the backend, and react.js on the front end. I can see in my rails console that I get the updated information from my http.patch request in rails, and it is received in rails, and now I am trying to adjust the…
Creider9
  • 1
  • 1
0
votes
1 answer

Converting existing Rails + React application to React on Rails with Server Side Rendering (SSR)

I need to convert at least small part of existing RoR + React + Redux app to React on Rails with Server Side rendering for measure performance and effort. Already made setup from this tutorial shakacode/react_on_rails_demo_ssr_hmr (previous…
user2791999
  • 178
  • 2
  • 14
0
votes
1 answer

Need to have a clear all button in for legend items in Highchart react

I have a packedbubble chart in React and need to have a clear all button that can deselect all the legendItems. So I can have a button beside the description to clear all the selected legend Items and have a blank chart and on click of individual…
0
votes
1 answer

"Uncaught Error: Invalid hook call." React on Rails

I'm using react on my Ruby on Rails project and i caught error Uncaught Error: Invalid hook call. I'm using gem react-on-rails. My component code: const DimaSearch = () => { const [searchObject, setSearchObject] = useState("") useEffect(()…
dimko
  • 1
0
votes
0 answers

React Hooks throws error Hooks can only be called inside of the body of a function component.. after upgrade to web pack 4

I have Rails Application with React On Rails, recently upgraded webpack 3 to webpack 4 Rails : 4 Ruby: 2+ React: 16.9 Webpack: 4.41.5 everything works well except below code which works well with webpack 3 In the console I see below error Uncaught…
anu
  • 1
  • 3
0
votes
1 answer

React on Rails component not rendering when used inside of `capture_haml` block

I have React on Rails set up for my project. I have a haml template that renders a React component: -# my_template.haml %div = react_component('MyComponent') Now, if I render this template inside of another template, it works as expected, and I…
elethan
  • 16,408
  • 8
  • 64
  • 87
0
votes
0 answers

Export React view to MS Word doc

I'm starting a project where I need to do the following: On a web interface, user chooses from a list of text elements (survey questions) stored in a database. User can rearrange the order of questions using drag and drop. User can also edit survey…
0
votes
1 answer

gem react-rails fails to install react on rails 6

I'm trying to set up on my app the gem 'react-rails', following https://github.com/reactjs/react-rails. bundle install rails webpacker:install rails webpacker:install:react He's set up the app/javascript/components/ directory for your React…
pierrecode
  • 192
  • 2
  • 15
0
votes
1 answer

What's a proper way to design Ruby on Rails application with React

I'm doing some project using Ruby on Rails with React. I'm using react-rails gem. I have some questions about how to properly design the architecture of Rails and React app. My question is mainly about passing data between Rails and React. I know…
Tomasz
  • 191
  • 2
  • 12
0
votes
2 answers

Is there a way to fetch data in database from a Ruby-on-Rails models

I have a rails app running alongside with a rails API, there is a constant value for DAYS_LIMIT in config/initializers/constants.rb DAYS_LIMIT = 40 DEFAULT_PRICE = 1.29 but now in the app i added an input field so that the user decide his…
0
votes
1 answer

access data from a rails service in react front end react-on-rails

Quite new to React on Rails apps, especially the React portion. I'm trying to access data in a nested hash that is given from a SQL query in a Rails service. First off, is this even possible? In Rails Console, lets say user1 has already been found…
Sachin
  • 27
  • 5
0
votes
1 answer

React + Redux + Rails losing store after switching the page

I having an issue with the Redux store in getting react_on_rails where I want to switch the page and it doesn't work correctly for me. I am losing the redux store if I change the page or reload it. Also, I am sorry for a pile of code I put, but I…
GYTO
  • 440
  • 1
  • 10
  • 23
0
votes
0 answers

Access Nested Data from Rails backend React frontend

I'm trying to figure out how to access my Rails data that is sent to me in a nested hash, from my react front end. I finally set it up where it is hitting the correct controller to get the information from. Here is the relevant code: class…
Sachin
  • 27
  • 5
0
votes
1 answer

React On Rails and Redux losing Persist Store after changing the page

I am trying to build a simple application with Ruby on Rails and React. I am using a gem react_on_rails. In addition, I am trying to use Redux to communicate between different components when I need. The issue that I having at the current moment I…
GYTO
  • 440
  • 1
  • 10
  • 23