-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Description
After #31, the args for https://github.com/ryanflorence/react-project/blob/master/create-react-project/blueprint/modules/api/hello.js#L1 need to be updated
// now
export default function (req, res, { params, location, route }) {
...
}
// correct
export default function (req, res, lastRoute, { params, location, route }) {
...
}(In the README as well https://github.com/ryanflorence/react-project/blob/master/README.md#serverroutehandlerreq-res--params-location-route-)
However, the lastRoute and route args there are the same. Would it make sense to use props.route instead of adding a separate arg here in handleServerRoute?: https://github.com/ryanflorence/react-project/blob/master/modules/PublicServerAPI.js#L143
// now
function handleServerRoute(req, res, route, props) {
const handler = route[req.method.toLowerCase()]
...
}
// perhaps?
function handleServerRoute(req, res, props) {
const handler = props.route[req.method.toLowerCase()]
...
}(Will gladly open a small PR for either one!)
Metadata
Metadata
Assignees
Labels
No labels