Passing query parameters? #11
-
How would one go about passing query parameters when using |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Looks like I may have to pass the query param directly in the url for |
Beta Was this translation helpful? Give feedback.
-
Actually, I have problems adding a querystring to If I remove the querystring, it's fine |
Beta Was this translation helpful? Give feedback.
-
Hi @theogravity , I'm sorry for the delay, but I'm working on some experiments on v2 to solve that problem! My current experiments are along these lines: - main process createRoute({
id: 'main',
query: {
id: 'my-id',
},
browserWindow: mainWindow,
devServerUrl: process.env.ELECTRON_RENDERER_URL!,
htmlFile: path.join(__dirname, '../renderer/index.html'),
}) - renderer process: const [params] = useSearchParams()
...
params.get('id') // my-id What do you think about this way? |
Beta Was this translation helpful? Give feedback.
-
@theogravity fixed by v2 release: |
Beta Was this translation helpful? Give feedback.
@theogravity fixed by v2 release:
https://electron-router-dom.daltonmenezes.com/