Move getStablePath
method into the "url" package
#35799
Labels
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
[Package] API fetch
/packages/api-fetch
[Package] Url
/packages/url
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
Both createPreloadingMiddleware and createMenuPreloadingMiddleware functions need to be able to call the
getStablePath
method.As of now, we have some duplicate code (2
getStablePath
methods defined).See this and that for reference.
More context can be found here: https://github.com/WordPress/gutenberg/pull/35402/files#r728631767
What is your proposed solution?
getStablePath
into theurl
package (and possible rename it tonormalizeQueryString
).normalizeQueryString
function from the url package and use it forcreatePreloadingMiddleware
andcreateMenuPreloadingMiddleware
instead ofgetStablePath
getStablePath
method (check if it used elsewhere in the project first).The text was updated successfully, but these errors were encountered: