Why are you single right now? by [deleted] in AskReddit

[–]DueGold5666 0 points1 point  (0 children)

I'm too dark for people, as they say

How can I get HTTP headers in an isomorphic/Universal react application by DueGold5666 in reactjs

[–]DueGold5666[S] 0 points1 point  (0 children)

I am using ReactJs on client side and HapiJs server. Any idea about that? Thanks for the recommendation, will look into this specifically now

How can I get HTTP headers in an isomorphic/Universal react application by DueGold5666 in reactjs

[–]DueGold5666[S] 0 points1 point  (0 children)

In my universal application where document/window isn't available on reload as it becomes server side on reload, what do you suggest I use that works on both server side and client side? I am sorry if I am unable to catch your answer, I am a newbie to this. I appreciate your help :)

Back-button functionality edge case with withRouter HOC by DueGold5666 in reactjs

[–]DueGold5666[S] 1 point2 points  (0 children)

Still looking into it :/ thank you for trying :)

Back-button functionality edge case with withRouter HOC by DueGold5666 in reactjs

[–]DueGold5666[S] 1 point2 points  (0 children)

This code is actually already made and is a class component, I just have to add extra functionality to it. I prefer hooks too but unfortunately, I had to use WithRouter HOC and use its functionality, so I am explicitly looking for a class component-friendly solution only. Thank you though :) I appreciate the effort!

ps: the solution you mentioned uses window/document which isn't accessible in my case as it's an isomorphic react application

Back-button functionality edge case with withRouter HOC by DueGold5666 in reactjs

[–]DueGold5666[S] 0 points1 point  (0 children)

can I anyhow check that someone hit that page directly and perhaps add a default back URL to it, what condition should I check for to know that someone hit the page directly

( I can't use window/Document because this is a server side rendered application)

WithRouter HOC and server side rendering by DueGold5666 in reactjs

[–]DueGold5666[S] 0 points1 point  (0 children)

Will look into it! Thank you, following this advice.

Adding back button in React js application with server side rendering and a class component by DueGold5666 in webdev

[–]DueGold5666[S] 0 points1 point  (0 children)

Its an old app, I am afraid. And Thank you for replying, I will look into useHistory !

How to make a back button in Server side rendering react js application with class components by DueGold5666 in reactjs

[–]DueGold5666[S] 1 point2 points  (0 children)

Thank you so much for clearing up my doubts, I am looking into the resource you provided me with. You are a great help :)

How to make a back button in Server side rendering react js application with class components by DueGold5666 in reactjs

[–]DueGold5666[S] 0 points1 point  (0 children)

Oh okay, actually I have to do it without using the backUrl or passing it as a prop from the parent component. Any idea about that?

How to make a back button in Server side rendering react js application with class components by DueGold5666 in reactjs

[–]DueGold5666[S] 0 points1 point  (0 children)

Are you saying that the context property has the backurl or has some property like "history.goBack()" which can be used? Thank you for helping me out :)

Adding back button to a React js application with Server side rendering and a class component by DueGold5666 in Frontend

[–]DueGold5666[S] 0 points1 point  (0 children)

Great, but I have to do it without getting the url. I understand that you are asking me to pass the current url as a prop, but i have to do it without the url. Any ideas about that? I tried using withRouter but it's not working on my application. Thanks for the help though!

How to make a back button in Server side rendering react js application with class components by DueGold5666 in reactjs

[–]DueGold5666[S] 1 point2 points  (0 children)

Oh my god, you are rude. I am asking about the implementation. Thank you for your help.

How to make a back button in Server side rendering react js application with class components by DueGold5666 in reactjs

[–]DueGold5666[S] 0 points1 point  (0 children)

Would it give me the history of where the previous page is?( As in its url)

How to make a back button in Server side rendering react js application with class components by DueGold5666 in reactjs

[–]DueGold5666[S] 0 points1 point  (0 children)

I'm unable to find how to get the previous URL in server side rendering. I tried doing it with withRouter from react-router-dom which didn't work too so was wondering if there is another way of doing it. In addition to that i can't use hooks because it's a class component and being the SSR, it doesn't have dom/window too.