markfinger / python-react

Server-side rendering of React components
MIT License
1.62k stars 116 forks source link

Compatible with React 0.14? #52

Closed burkaygur closed 8 years ago

burkaygur commented 8 years ago

Hi! I think there may be a compatibility issue with React 0.14. I cant seem to get this library working for server side rendering in Python.

markfinger commented 8 years ago

Are any errors reported?

burkaygur commented 8 years ago

'RenderServer' object has no attribute 'url'

/usr/local/lib/python2.7/site-packages/react/render_server.py in render, line 52

markfinger commented 8 years ago

Ah, looks like bugs in the error-handling code :(

markfinger commented 8 years ago

@burkaygur I've just pushed 2.0.2, which fixes some errors in the response handling. From the sounds of it, you'll still get errors, but at least we can work out what they are.

Can you run pip install react==2.0.2 and see what happens now? I suspect you'll probably get some stack traces from node

markfinger commented 8 years ago

I've just updated all the package.json deps to latest, and made some small changes to a few files in the repo to bring everything up to speed.

If you're getting compatibility issues, refer to 07fa17c41b3f13b5154c505e41bd61b702f19782 for a minimal setup. You'll probably want to tweak the .babelrc setup to use a preset though: http://babeljs.io/docs/plugins/#presets

burkaygur commented 8 years ago

Gonna check this, this weekend and get back to you! Thank you very much. Should it work with 0.14.1 you think?

burkaygur commented 8 years ago

Cuz I see React 0.14.2 in the dependencies.

markfinger commented 8 years ago

Yeah, it should work with React 0.14