3

I am trying to render other component when successfully submit form. Form has different rails layout and after form submit it redirect with different layout.

Render component using react-router and redirect object but how can I render it with layout. Also I want display flash message after form submit with react. So if reload the page after submit form it is not possible to set flash message in react component. Any suggestion?

Thank you.

1 Answers1

4

try this maybe it's helpful

https://github.com/reactjs/react-rails/issues/901

If you want to write the layout by using React Component, you should render your contents in the layout component. In this case, all props should be passed to the Layout component at first and then you can pass some props to the child components

Sreetam Das
  • 3,226
  • 2
  • 22
  • 36
Sanjay Ranavaya
  • 587
  • 4
  • 19