LunatiqueCoder / luna

Luna - a React Native + Next.js template. Built with TypeScript :heart:
https://luna-gamma.vercel.app/
MIT License
265 stars 19 forks source link

feat(web): add web-compatible linking and titling in react-navigation #38

Closed mikehardy closed 2 years ago

mikehardy commented 2 years ago

I am new to the web stuff and forgot that managing the title URL in the browser bar is really important.

Not only does it pay to have the web title bar look nice (for bookmarking) but URL management is important for aesthetics, again for bookmarking (deep link recognition and page routing...) but most importantly: so the back button doesn't destroy your app's navigation state

So this adds a semi-fancy page title function as an example, and adds a third tab + config that shows how the whole thing works using the web-compatible version of react-navigation linking

As a PR it's kind of "meh" at the same time that I immediately noticed I needed it 2 layers up in my work projects, curious what you think here? If it looks good I'll expand it for the auth template

LunatiqueCoder commented 2 years ago

Hmm I always wanted to try it out, can’t wait to get home and see it in action 😂

mikehardy commented 2 years ago

If I had done a CI action already you'd just go clicky click and see it haha. next week maybe

mikehardy commented 2 years ago

I tested this on native as an afterthought - obviously it's web-focused - and I had to bump gradle ram to run it, so I added that as a follow-on commit