News for hackers. Stuff that matters.
Re:Build Your Own React by crooked-v on Thursday November 14, 2019 @02:35PM (#21538570)
My favorite routers to use with React at the moment are redux-first-router (define a route map, and an object in your Redux store gets automatically two-way synced with browser location state; your 'routing' is actually just a switch statement over the current location state), and Next.js (make some component files under pages/ and they get automatically rendered as routes; wrap a filename in brackets and it's used as a query param value wildcard). Both have advantages and disadvantages but are very low-mental-overhead in practice.
Re:Build Your Own React by allover on Thursday November 14, 2019 @04:32PM (#21539665)
Disagree there's anything really low-mental-overhead about bringing redux into your project.
Re:Build Your Own React by davidjnelson on Thursday November 14, 2019 @06:26PM (#21540665)
Can second redux-first-router being fantastic.