113 questions
0 votes
1 answer
125 views
Cannot access rails backend with fetch (500 Internal Server Error)
I'm trying to access an api backend in a React/Rails app. I'm referencing this tutorial (it's a little outdated, but works with a few tweaks). I can't seem to connect to the backend. How can I resolve ...
0 votes
1 answer
55 views
How does react process redirects?
I'm new to working with react and I think i have spent considerable time in researching about my issue/problem but no luck. I have a react FE and a rails BE. The FE is just a login page with a couple ...
0 votes
0 answers
90 views
How to use React on Rails with GraphQL SSR?
is it possible to use React on Rails to server-side render react component with GraphQL? In react components I have GraphQL Apollo request, and there is a way to collect data needed for the components....
0 votes
0 answers
159 views
ActionController::ParameterMissing (param is missing or the value is empty: asset):
I am pretty new to react on rails, I am sorry if this is something obvious! I know there are pages of this question, but none have fixed the error I am getting. Any advice is greatly appreciated! When ...
0 votes
1 answer
46 views
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::...
0 votes
1 answer
329 views
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 ...
1 vote
1 answer
451 views
Issue importing createRoot from "react-dom" in React on Rails
I am trying to create a React on Rails project for the first time. I have "react": "^18.2.0", "react_ujs": "^2.6.2", "react-dom": "^18.2.0", ...
0 votes
1 answer
592 views
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 ...
0 votes
1 answer
458 views
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 ...
1 vote
0 answers
118 views
ReactOnRails pre-rendering error after deploying web app with new Ruby and Node versions with Capistrano
Background of the problem My website is a Rails webapp running the Sharetribe open source code, with Puma & React on Rails to pre-render components. It has a TopBarApp component built by ...
1 vote
1 answer
504 views
React on Rails argument error when prerender is true
Setting prerender: true in index.html.erb <%= react_component('App', props: @props, prerender: true) %> Triggers the following error ActionView::Template::Error (wrong number of arguments (...
0 votes
1 answer
175 views
"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,...
0 votes
0 answers
204 views
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 ...
0 votes
1 answer
773 views
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 ...
1 vote
0 answers
186 views
How to reduce rails slug size on a react/rails project
I have a project with a ruby buildpack and a react buildpack the total slug size is about 109.8mb, the react side comes out to about 900kb (largest gzipped file 300kb), so I take this to mean that ...