From fbe5aaace23286ad2ae162827f6d4d93fa81be4a Mon Sep 17 00:00:00 2001
From: Charles Graham SWT
- Replace '/your-base-path/' with the actual base path
+ Replace '/your-base-path' with the actual base path
where your application will be deployed. This ensures that all URLs
in your application are correctly prefixed with the base path.
- In addition the doUpdateUrlWithBase function can be
- used to update the URL with the base path dynamically.
+ In addition the doUpdateUrl function can be
+ used to update the URL. Just take care to also prepend the BASE_URL constant to any paths you provide.
For situations where you require setting the base path such as in img tags or anchor tags, you can use the:{" "}
const base = import.meta.env.BASE_URL{" "}
+ const BASE_URL = import.meta.env.BASE_URL{" "}
Environment variable to get the base URL of your application. This @@ -530,18 +530,18 @@ export default defineConfig({
+
)
}`}
/>
- The doUpdateUrlWithBase function is a utility function
+ The doUpdateUrl function is a utility function
that allows you to update the URL in the browser without causing a
full page refresh. This is useful when you want to update the URL
based on user interaction, such as clicking on a link or submitting
@@ -551,17 +551,17 @@ export default function Example() {
Inside your component, you can call the{" "}
- doUpdateUrlWithBase function with the new URL you want
+ doUpdateUrl function with the new URL you want
to navigate to. Be sure to also import the{" "}
- doUpdateUrlWithBase function from the{" "}
+ doUpdateUrl function from the{" "}
redux-bundler package.
./src/app-pages/mypath/tab-example.jsx
{" primitive component.
+