Open zachariahtimothy opened 8 years ago
+1
@bmustata not sure if you saw it but I created a Gist to show how I got this working. Not sure it is the sexiest code but it works consistently. https://gist.github.com/zachariahtimothy/4e150b3931e4f299138e
Not sure this is a CollectionFS bug, React, or Flow Router issue but I have found on the server side rendering of React components CollectionFS media does not have a method .url(). The media returns just fine with all the copies one would expect but the url function is undefined. This works fine on the client side. I am using Meteor, React, FlowRouterSSR, and ReactLayout. If I run the following in the JSX file (outside of the React component) it works fine:
Putting the query and console.log ANYWHERE in the React component and the media is found, but .url is undefined. Again I know this may not be a CollectionFS bug but I am at a loss why .url works fine everywhere else, but not within React componenets. Thanks!