Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major change to fix issues with React Hooks #1268

Merged
merged 11 commits into from
Apr 27, 2020
2 changes: 1 addition & 1 deletion spec/dummy/client/app/startup/DeferredRenderAppServer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const DeferredRenderAppServer = (_props, railsContext) => {
return { error, redirectLocation };
}

return <RouterContext {...routerProps} />;
return () => <RouterContext {...routerProps} />;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, @Judahmeek. It needs a React function component, not JSX.

};

export default DeferredRenderAppServer;
4 changes: 2 additions & 2 deletions spec/dummy/spec/system/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ def finished_all_ajax_requests?

context "React Hooks" do
context "Simple stateless component" do
include_examples "React Component", "div#HelloWorldApp-react-component-6"
include_examples "React Component", "div#HelloWorld-react-component-6"
end
context "render function that takes props" do
include_examples "React Component", "div#HelloWorldApp-react-component-7"
include_examples "React Component", "div#HelloWorld-react-component-7"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An idea on why this changed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are the Ids that you used in your initial commit: be37b34?file-filters%5B%5D=.erb#diff-13675373e6eaa2b6e91995c3ec8974f7

end
end
end
Expand Down