Passing API call results to a Component

  • benjabievres-1338514819497590854

    benjabievres

    1 month ago

    Hello, I'm building a component that requires data coming from an API call (an Array of items). I want to call once the API when page loads, and then pass its response to the component.
    I tried with Attributes and with Context variables, but none allow me to see the structure of the data so that I can build my UI.
    Is there a way to show the data coming from the API response in my context?
    Thanks
  • andreasmoller-1338515503798419566

    Andreas Møller

    1 month ago

    You can comply the data from the request and paste it as a test value
  • benjabievres-1338515675408367657

    benjabievres

    1 month ago

    @Andreas Møller thanks for your answer! I think you meant "copy the data"?
  • andreasmoller-1338515730898878567

    Andreas Møller

    1 month ago

    Yes
    🤩1
  • benjabievres-1338515887996665899

    benjabievres

    1 month ago

    Oh nice! meaning also that I don't need to call the API everytime, right?
  • (when designing the component)
  • andreasmoller-1338516400041496577

    Andreas Møller

    1 month ago

    Yes
    👍1

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.