<template>
    <div>
        {{ StepName }} : {{ stepData.result }}
    </div>
    <br>
</template>
<script>
export default {
    data() {
        return {
            stepData: "",
            StepName: this.name,
        }
    },
    mounted() {
        this.fetchData();
    },
    props: [
        'name'
    ],
    methods : {
        async fetchData() {
            const response = await fetch("http://localhost:3333/step", {
                    method: "POST",
                    body: this.StepName,
                }
            );
            this.stepData = await response.json();
        },
    }
};
</script>
<style></style>