I followed example, as you have configured tipc in project, when im calling sum.uerQuery()
in home page
import { Button } from '@/components/ui/button'
import { client } from '@/client'
export const Home = () => {
const { data } = client.sum.useQuery({ a: 1, b: 2 })
// console.log(data)
return (
<main>
<Button>Click</Button>
</main>
)
}
im getting error in terminal registerIpcMain(router)
I put that everywhere but seems like it ain't working
Error occurred in handler for 'sum': Error: No handler registered for 'sum'
this is where i setup
app.whenReady().then(() => {
registerIpcMain(router) // here
electronApp.setAppUserModelId('com.electron')
app.on('browser-window-created', (_, window) => {
optimizer.watchWindowShortcuts(window)
})
ipcMain.on("ping", () => console.log("pong")) // this works btw
createWindow()
app.on('activate', function () {
if (BrowserWindow.getAllWindows().length === 0) createWindow()
})
})
what am I doing wrong?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too