Indrajeet Mishra
Indrajeet Mishra

Reputation: 105

Encountered error "ReferenceError: $ is not defined" Using rails-react

I am facing problem when making prerender: true, any way to fix it?

Encountered error "ReferenceError: $ is not defined" when prerendering Store with {"data":{"results":708,"total_pages":59,"previous_page":null,"next_page":2,"designs":

Upvotes: 3

Views: 14230

Answers (1)

BradByte
BradByte

Reputation: 11093

You might need to require the jquery package. I'm running an isomorphic server rendered app and had to include var $ = require ('jquery') (after installing it -- npm install --save jquery) on all the components that reference jQuery.

Upvotes: 10

Related Questions