Error occurred in handler for 'sum': Error: No handler registered for 'sum'
- Dominant language
- TypeScript
- Stars
- 306
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
I followed [example](https://github.com/egoist/tipc/tree/main/example), as you have configured tipc in project, when im calling `sum.uerQuery()` in home page
```js
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 (
Click
)
}
```
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
```js
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.