Django-React-NotesApp
Django-React-NotesApp copied to clipboard
get rid of arguments in Notepage(). then get noteId via: let noteId = useParams().id; history is replaced by useNaviagte. So use let navigate = useNavigate(); Change history.push('') to navigate ('')....
**Problem:** page doesn't update in `LinkItem.js` at `` **Solution:** just update `npm i react-router-dom`
Sometimes(~50%) it need hard page refresh or step back to NotePage and come back to list of notes again
when I Create new note it works first time, from 2nd time it's created in database but doesn't appear on the frontend, when 3rd time I perform create operation 2nd...
 
api/utils def updateNote(request, pk): data = request.data note = Note.objects.get(id=pk) serializer = NoteSerializer(instance=note, data=data) if serializer.is_valid(): serializer.save() return serializer.data
Install jquery using npm