Closed oliviertassinari closed 1 year ago
I don't think that we need to loop through all the registered routes: https://github.com/fridays/next-routes/blob/193f2a38605b03895f6bf9c23c65f72c0338d5c8/src/index.js#L51
You're right we could return earlier when a route was found. We used .find in the past but people had problems in IE. Maybe a for loop with early return would be best
.find
for
I don't think that we need to loop through all the registered routes: https://github.com/fridays/next-routes/blob/193f2a38605b03895f6bf9c23c65f72c0338d5c8/src/index.js#L51