diff --git a/README.md b/README.md index c01c0a8..93d3949 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Minified size](https://img.shields.io/bundlephobia/min/@hyperjumptech/react-next-pathname) ![Test coverage](https://img.shields.io/codecov/c/github/hyperjumptech/react-next-pathname) ![Monthly download](https://img.shields.io/npm/dm/@hyperjumptech/react-next-pathname) -This is a helper tool you can use in your React application to make your it feels faster and smoother when navigating between pages. Say you have a sidebar that contains links to different pages. When you click a link, the component that displays the link will show that it's currently active. Usually like this, +This is a helper tool you can use in your React application to make it feel faster and smoother when navigating between pages. Say you have a sidebar that contains links to different pages. When you click a link, the component that displays the link will show that it's currently active—usually like this: ```tsx const isPathActive = (pathname: string) => { @@ -33,13 +33,13 @@ const Sidebar = () => { }; ``` -The problem is when the clicked page is slow to load because of bad network condition or slow server response, the clicked link will not immediately show that it's active. This is because the `window.location.pathname` is not updated until the page has fully loaded. The users might think that there is nothing happening when they click the link, and they will be confused. +The problem is that when the clicked page is slow to load due to bad network conditions or slow server response, the clicked link will not immediately show that it's active. This is because the `window.location.pathname` is not updated until the page has fully loaded. Users might think that nothing is happening when they click the link, and they will be confused. This library helps you solve this problem by allowing you to get the next pathname immediately when a link is clicked, without waiting for the new page to load. ## Installation -To install `@hyperjumptech/react-next-pathname`, run the following command: +To install `@hyperjumptech/react-next-pathname`, run one of the following commands: **NPM**