This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useContext, useMemo } from 'react'; | |
// eslint-disable-next-line camelcase | |
import { UNSAFE_RouteContext, useParams } from 'react-router-dom'; | |
/** | |
* Temporary workaround to get RAW params from react-router-dom v.6 | |
* Should hanndle most of the simple cases like /:myVar/someVar/:mySecondVar | |
* @returns {Object} The same as useParams from react-router-dom but returns RAW (not URL decoded) paramters | |
*/ | |
export default function useRawParams() { |
OlderNewer