1

I need to go back to the previous URL on click of a button in lightning component.Currently I am using window.history.back(); for the same. Is it good practice to use window.history.back()?

1

Yes, window.history methods are allowed, so you should feel free to use them if they are appropriate to the task at hand.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.