We generally recommend using Vike with an RPC tool. See Guides > Data Fetching.

What is RPC?

Remote Procedure Call (RPC, aka Server Actions) enables the frontend to seamlessly call backend functions, see in-depth explanation here.

It's an increasingly popular data-fetching technique, used instead of GraphQL and REST. You can use both RPC and GraphQL/RPC in the same app, but that's rarely necessary.

Common RPC tools:

  • Telefunc

    Telefunc was created by the Vike team.

    There is work-in-progress to be able to use Telefunc to fetch initial data (instead of using +data), see Telefunc > #102.

  • tRPC

    Similar to Telefunc:

    • Con: Telefunc is simpler.
    • Pro: supports real-time data using websockets.

See also