Closed vianvio closed 4 years ago
Currently, I think the reason we can't support hash route is due to these lines
if (typeof props.to === 'string') { hashFragment = props.to .split('#') .slice(1) .join('#'); } else if ( typeof props.to === 'object' && typeof props.to.hash === 'string' ) { hashFragment = props.to.hash.replace('#', ''); }
If we let the user to set anchor Id, leave a prop such as anchor, and use the string passed in to replace these lines (or leave these lines for default logic also works), then we can support hash routers.
Added elementId prop to v2.2.0
elementId
Currently, I think the reason we can't support hash route is due to these lines
If we let the user to set anchor Id, leave a prop such as anchor, and use the string passed in to replace these lines (or leave these lines for default logic also works), then we can support hash routers.