Berchris Requiao
Berchris Requiao
Try this: ``` import { matchPath } from 'react-router-dom'; const match = matchPath( router.location.pathname, // like: /course/123 { path: '/course/:id' } ); const id = match.params.id; // get: 123 ```
@jorgenbs @trungdq88 you can do this way too: ``` import { createMatchSelector } from 'connected-react-router'; const matchSelector = createMatchSelector({ path: '/course/:id }) const match = matchSelector(state) // like: /course/123 const...
@eladdo92 Have you tried this: ``` import { createMatchSelector } from 'connected-react-router'; const matchSelector = createMatchSelector({ path: '/course/:id }) const match = matchSelector(state) // like: /course/123 const id = match.params.id;...
@danbopes Actually, I centralize all routes in one file like: ``` // router.js export const routes = { courses: { path: '/courses' }, authors: { path: '/authors' }, about: {...
What you mean it not support the new `bind operator`? This plugin is just for syntax highlighting and it highlight `Bind Operator` properly for me.
Are you using optional chaining with ESLint, Babel, babel-eslint and plugin-proposal-optional-chaining? I'm trying to use it in my code, but ESLint keeps throwing an error.
@ovac I've decided to switch to [Babel JavaScript](https://github.com/michaelgmcd/vscode-language-babel), because there is a more active developer community.