From d5477adf95bee6da8b65a72a744b1a3a755c3e62 Mon Sep 17 00:00:00 2001 From: MICHAEL JACKSON Date: Mon, 27 Nov 2017 14:05:42 -0800 Subject: [PATCH] Fix some links --- content/docs/render-props.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/render-props.md b/content/docs/render-props.md index f97295c3..e335915a 100644 --- a/content/docs/render-props.md +++ b/content/docs/render-props.md @@ -203,7 +203,7 @@ More concretely, **a render prop is a function prop that a component uses to kno This technique makes the behavior that we need to share extremely portable. To get that behavior, render a `` with a `render` prop that tells it what to render with the current (x, y) of the cursor. -One interesting thing to note about render props is that you can implement most [higher-order components](/react/docs/higher-order-components.html) (HOC) using a regular component with a render prop. For example, if you would prefer to have a `withMouse` HOC instead of a `` component, you could easily create one using a regular `` with a render prop: +One interesting thing to note about render props is that you can implement most [higher-order components](/docs/higher-order-components.html) (HOC) using a regular component with a render prop. For example, if you would prefer to have a `withMouse` HOC instead of a `` component, you could easily create one using a regular `` with a render prop: ```js // If you really want a HOC for some reason, you can easily @@ -227,7 +227,7 @@ So using a render prop makes it possible to use either pattern. ### Be careful when using Render Props with React.PureComponent -Using a render prop can negate the advantage that comes from using [`React.PureComponent`](https://reactjs.org/docs/react-api.html#reactpurecomponent) if you create the function inside a `render` method. This is because the shallow prop comparison will always return `false` for new props, and each `render` in this case will generate a new value for the render prop. +Using a render prop can negate the advantage that comes from using [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) if you create the function inside a `render` method. This is because the shallow prop comparison will always return `false` for new props, and each `render` in this case will generate a new value for the render prop. For example, continuing with our `` component from above, if `Mouse` were to extend `React.PureComponent` instead of `React.Component`, our example would look like this: