remix-run / react-router-website

The React Router website
https://reactrouter.com
MIT License
149 stars 33 forks source link

Upgrade to v2! #80

Closed brophdawg11 closed 7 months ago

brophdawg11 commented 8 months ago

@brookslybrand hey sorry did this live - yolo

This should be good to go now, I updated to all the v2 APIs and upgraded to 2.3.1.

The biggest surface area change was changing the seo function to the new Meta syntax, but it was mostly a find/replace.

- meta.description = config.description;
+ meta.push({ name: "description", content: config.description });

I confirmed things look good by comparing a few pages meta locally versus the live prod site by running this ion the console (not you will get different robots values since it's supposed to be indexed on prod and unindexed locally):

console.log(Array.from(document.querySelectorAll('meta')).reduce((acc,m) => acc += m.outerHTML + "\n", ''))
brookslybrand commented 8 months ago

@brookslybrand hey sorry did this live - yolo

Haha I don't mind at all

brophdawg11 commented 7 months ago

Only thing holding this up from merging is finishing up the meta changes in f3d9408

brophdawg11 commented 7 months ago

ok - meta stuff is updated in a8a9857

brookslybrand commented 7 months ago

Good stuff @brophdawg11. Pulled locally and manually smoke tested. Also looked through the code and everything looks good. Thanks for taking on some maintenance here