@@ -12,13 +12,13 @@ The handler is a function that is called for every request to the route. It
1212needs to return a response that is then sent to the client. The response could
1313be anything: a plain text string, a JSON object, an HTML page, a WebSocket
1414connection, a streaming file, or pretty much anything else. The handler is
15- passed a ` render ` function that it can call to invoke rendering the component.
15+ passed a ` render ` function that it can call to invoke rendering a component.
1616
1717The component is the template for a page. It is a JSX element that is rendered
1818on the server. The page component gets passed props that can be used by it to
19- determine exactly what should be rendered. By default the request URL, the
20- matches from the URL pattern match, and any data passed to the handler's
21- ` render ` function are passed to the component as props .
19+ determine exactly what should be rendered. By default components receives props
20+ consisting of: the request URL, the matches from the URL pattern match, and any
21+ data passed to the handler's ` render ` function .
2222
2323Let's look at a basic route that returns a plain text string:
2424
@@ -38,9 +38,10 @@ To define a handler, one needs to export a `handler` function or object from the
3838route module. If the handler is an object, each key in the object is the name of
3939the HTTP method that the handler should be called for. For example the ` GET `
4040handler above is called for ` GET ` requests. If the handler is a function, it is
41- called for all requests regardless of the method.
41+ called for all requests regardless of the method. If a HTTP method does not have
42+ a corresponding handler, a 405 HTTP error is returned.
4243
43- Now, let's render some HTML using the route component. Another example :
44+ Now, let's render some HTML using the route component:
4445
4546``` tsx
4647// routes/html.tsx
0 commit comments