Earlier quoted context omitted.
Silly question, but can't you run Django to serve your backend API, and Webpack to serve your static assets including javascript, then use an http proxy like Nginx to serve them under the same url?
well for development that's a good idea. For production you don't want to have webpack serving anything, you want it compiled, right?
Django React Redux JWT Base Project
11–20 of 28 posts
Re: Django React Redux JWT Base Project
#12Nevertheless, nice boilerplate project :).
[0] https://github.com/Seedstars/django-react-redux-jwt-base/tre...
[1] https://github.com/Seedstars/django-react-redux-jwt-base/blo...
Re: Django React Redux JWT Base Project
#13Re: Django React Redux JWT Base Project
#14Earlier quoted context omitted.
well for development that's a good idea. For production you don't want to have webpack serving anything, you want it compiled, right?
That's what I do. Webpack compiles to the static/ dir and Django serves the static files in that dir. I don't know how/why you would do it otherwise.
Where django would instead load a custom JS endpoint in development, and use the compiled file for production.
Webpack static compile each time is just way to slow— I've seen it take 60+seconds to compile.
Re: Django React Redux JWT Base Project
#15Not sure why the `accounts` app is included [0]. As seen from the comments [1] in the `models.py` it looks like it's from an existing project, don't think this should be in a boilerplate project. Nevertheless, nice boilerplate project :). [0] https://github.com/Seedstars/django-react-redux-jwt-base/tre... [1] https://github.com/Seedstars/django-react-redux-jwt-base/blo...
Re: Django React Redux JWT Base Project
#16Does this render all the React content server-side first? I wasn't able to figure out from an initial glance through the files.
Re: Django React Redux JWT Base Project
#17Re: Django React Redux JWT Base Project
#18The main thing I'm still trying to get my head round with React/Redux/Router is where in the lifecycle to do data fetching - I noticed you're doing it in componentWillMount, when the React docs suggest componentDidMount, and I've seen others do it in various other ways with no clear indication what the 'best practice' approach is.
Re: Django React Redux JWT Base Project
#19Ugh! Blah. Spit.
Re: Django React Redux JWT Base Project
#20Great work, I've been enjoying using this exact stack recently - this has definitely taught me a few things. The main thing I'm still trying to get my head round with React/Redux/Router is where in the lifecycle to do data fetching - I noticed you're doing it in componentWillMount, when the React docs suggest componentDidMount, and I've seen others do it in various other ways with no clear indication what the 'best p…