For some time I've been developing a django rest/react app. I'm still a newbie in this topic and most of the time I apply just-working solutions to my project.
Gradually I'm lerning new things. There is this topic that bothers me.
In my app I have this like 'main view' with a nav bar and a drawer (simply from material-ui). In drawer I've declared some buttons for navigation. Now the only view/layout changing is this empty space excluding nav bar and drawer (on the left). So it's facebook-like layout (with only middle part changing when navigating trough main stream or groups/pages).
Those buttons in drawer use history.push()
from react, as it was easiest to apply, but I wonder is it the right way ? Django has it's redirections, shouldn't I use those ?
There is not much of a comparison between history
and redirect
. Something interesting I've found is: React-Router - Link vs Redirect vs History .
Also, I've implemented a simple login and django auth, but with axios.post
ing I'm able to trace this this request in browsers network
. Is there a better, or more important a safer way of requesting ?