#best practice to trigger via api routes or server actions?
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
title basically. i did see this warning on the docs If you are using Next.js Server Actions you’ll need to be careful with bundling. but I couldnt find out more about this and I am new to nextjs/js world so would appreciate some guidance 🙏🏽
Just make sure to call tasks.trigger<typeof yourTask>()instead of yourTask.trigger()
You need to make sure to import your task as type (import type {yourTask})
More here:
Yes, exactly that 👆