From e056b9d0a3e5277196ddaa9c79e3f1d5a46ba9d9 Mon Sep 17 00:00:00 2001 From: Vipul Gupta <55375170+vipul0425@users.noreply.github.com> Date: Wed, 19 Jun 2024 10:48:19 +0530 Subject: [PATCH] Updates the reference links in @wordpress/compose documentation. (#62593) * docs: Update the links. * docs: Updates hooks reference link. --- docs/contributors/code/coding-guidelines.md | 2 +- packages/compose/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/contributors/code/coding-guidelines.md b/docs/contributors/code/coding-guidelines.md index b76d77b3040e6..0365a87e0ae40 100644 --- a/docs/contributors/code/coding-guidelines.md +++ b/docs/contributors/code/coding-guidelines.md @@ -758,7 +758,7 @@ When documenting an example, use the markdown \`\`\` code block to ### Documenting React components -When possible, all components should be implemented as [function components](https://reactjs.org/docs/components-and-props.html#function-and-class-components), using [hooks](https://reactjs.org/docs/hooks-intro.html) for managing component lifecycle and state. +When possible, all components should be implemented as [function components](https://reactjs.org/docs/components-and-props.html#function-and-class-components), using [hooks](https://react.dev/reference/react/hooks) for managing component lifecycle and state. Documenting a function component should be treated the same as any other function. The primary caveat in documenting a component is being aware that the function typically accepts only a single argument (the "props"), which may include many property members. Use the [dot syntax for parameter properties](https://jsdoc.app/tags-param.html#parameters-with-properties) to document individual prop types. diff --git a/packages/compose/README.md b/packages/compose/README.md index f4f0631ba36a5..62eaad1800a6a 100644 --- a/packages/compose/README.md +++ b/packages/compose/README.md @@ -1,6 +1,6 @@ # Compose -The `compose` package is a collection of handy [Hooks](https://reactjs.org/docs/hooks-intro.html) and [Higher Order Components](https://facebook.github.io/react/docs/higher-order-components.html) (HOCs) you can use to wrap your WordPress components and provide some basic features like: state, instance id, pure... +The `compose` package is a collection of handy [Hooks](https://react.dev/reference/react/hooks) and [Higher Order Components](https://legacy.reactjs.org/docs/higher-order-components.html) (HOCs) you can use to wrap your WordPress components and provide some basic features like: state, instance id, pure... The `compose` function is inspired by [flowRight](https://lodash.com/docs/#flowRight) from Lodash and works the same way. It comes from functional programming, and allows you to compose any number of functions. You might also think of this as layering functions; `compose` will execute the last function first, then sequentially move back through the previous functions passing the result of each function upward.