You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
huh, totally annoying thing I just now noticed. If you're on state A and scroll down the page and then go to state B, you won't be taken back to the top when state B loads.
A reasonable question that needs a reasonable answer written down somewhere (I know I've answered it a couple times before in chats, so it really needs to be documented).
There are other general questions like this that I know need answers, so I'm thinking there should be a new markdown file at the root of the repo named "reasonable-questions.md" or something, and a list of questions linking to the answers in that file at the bottom of readme.md.
The text was updated successfully, but these errors were encountered:
Since maybe people will search for this and wonder, here's basically what I've done in a few apps:
constshouldScrollToTop=(currentState,previousState)=>{returncurrentState==='some state names'&&previousState==='some other states'}conststateChangeHistory=[];stateRouter.on('stateChangeStart',state=>{constpreviousStateName=stateChangeHistory[stateChangeHistory.length-1]if(shouldScrollToTop(state.name,previousStateName)){window.scrollTo(0,0)}stateChangeHistory.push(state.name)})
As phrased by @daytonlowell:
A reasonable question that needs a reasonable answer written down somewhere (I know I've answered it a couple times before in chats, so it really needs to be documented).
There are other general questions like this that I know need answers, so I'm thinking there should be a new markdown file at the root of the repo named "reasonable-questions.md" or something, and a list of questions linking to the answers in that file at the bottom of readme.md.
The text was updated successfully, but these errors were encountered: