Skip to content

Example | WithCable

Below are some examples of withcable use cases in real projects. The purpose of these examples is to give developers an idea of the ease and simplicity of how withcable works, so as not to burden the project, reduce the code base, and reduce front end complexity. Not like today's SPA frameworks. If you are unsure if this is a server response, you can look at the network tab in your chrome devtools and see there some request.

  • Gives an example of how a developer uses a form to make a request and that request will update the UI section without reloading.
  • Gives an example of how a developer uses a form to make a request and that request will update some parts of the UI directly without reloading.
  • Making form validation feels very easy without duplicating state on the frontend.
  • When a request takes a long time to complete, developers can add loading as a sign that the user should wait for this request.
  • Intercept all requests with the z:before-request event. Then add custom headers, such as csrf, cache-control, etc.
  • create infinite scroll when we press the "Load more" button, then the content will increase.
  • Perform a search against a data directly without reloading.
  • Polling is a real-time feature that makes continuous requests to the server.
  • SSE connection is one of the real-time features available in withcable. It's often chosen because it's lightweight and resource-efficient.