<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by raditia on Medium]]></title>
        <description><![CDATA[Stories by raditia on Medium]]></description>
        <link>https://medium.com/@raditia?source=rss-ecfa7fd3fcd1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Qu2eUY-9yOcqohtB1wXCzw.jpeg</url>
            <title>Stories by raditia on Medium</title>
            <link>https://medium.com/@raditia?source=rss-ecfa7fd3fcd1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 01:33:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raditia/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Day I Left Home and Nearly Fell Over]]></title>
            <link>https://raditia.medium.com/the-day-i-left-home-and-nearly-fell-over-d330eca32240?source=rss-ecfa7fd3fcd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d330eca32240</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[work]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[raditia]]></dc:creator>
            <pubDate>Wed, 03 Jun 2026 14:30:36 GMT</pubDate>
            <atom:updated>2026-06-03T14:30:36.749Z</atom:updated>
            <content:encoded><![CDATA[<p>I remember the exact moment it hit me that I had made my life significantly more complicated.</p><p>I was standing in the middle of a new office, laptop bag on my shoulder, surrounded by people who moved through the space with the easy confidence of people who knew where the bathroom was. My first day at a new company after 7 years at the same place. And my legs — my own legs, which had carried me faithfully through three decades of life — were quietly threatening to give out.</p><p>But I’m getting ahead of myself.</p><h3>Home</h3><p>For 7 years, I worked at the same company. Long enough that I stopped noticing the office smell. Long enough that I had opinions about which elevator was fastest. Long enough that the codebase, with all its quirks and legacy decisions and that one component nobody wanted to touch, felt like a place I genuinely <em>knew</em>.</p><p>I was a frontend developer, and I had a framework that just <em>clicked</em> for me — the kind where the mental model makes sense, where you stop thinking about syntax and just think about the problem. If you’ve had that with any tool in your career, you know what I mean when I say that leaving it felt a little personal.</p><p>But the offer was good. Better than good. And somewhere under the comfort and the familiarity, I knew it was time.</p><p>So I wrote a warm resignation letter (no reason stated — I’m a professional), gave a long notice period, and told myself I was ready.</p><h3>The Decision I Couldn’t Stop Second-Guessing</h3><p>Except — I almost didn’t go.</p><p>Before any of this, there was a period of time I can only describe as <em>spreadsheet hell with feelings</em>. I had an offer. A good one. And instead of just saying yes like a normal person, I spent weeks dissecting it from every possible angle.</p><p>The salary comparison. The tax implications. The benefits delta. The contract clauses — oh, the contract clauses. I read that thing like I was studying for an exam I couldn’t afford to fail. Notice periods, non-compete terms, probation conditions. I highlighted things. I asked questions. I asked more questions. I built mental models and then dismantled them and then rebuilt them slightly differently.</p><p>I told myself it was due diligence. And it was, partly. But if I’m honest, a lot of it was also just fear dressed up as analysis.</p><p>Because underneath all the numbers and clauses, the real question I kept circling was simpler and harder than any of them: <em>what if I leave and it turns out I was wrong?</em> What if the new place isn’t better — just different, and unfamiliar, and harder, and I’ve given up something I can’t get back?</p><p>I had built something at my old company. Not just skills or tenure, but a kind of rootedness. I knew the people, the politics, the unwritten rules. I knew which meetings actually mattered and which ones you could half-attend. That kind of knowledge takes years to accumulate and approximately one resignation letter to lose.</p><p>In the end, I said yes. Not because the uncertainty went away, but because I realized it wasn’t going to — and waiting for certainty that was never coming wasn’t a plan, it was just delay.</p><h3>The First Morning</h3><p>I wasn’t ready.</p><p>The new office was fine. The people seemed nice. My assigned buddy greeted me with the kind of patient energy that suggested he had done this before — walked a bewildered new hire through a codebase and survived to tell the tale.</p><p>He opened the repository.</p><p>I had been told the stack was different from what I was used to. I knew this going in. I had even, in the weeks before, watched a few tutorials. <em>How different could it be</em>, I had thought.</p><p>It was different.</p><p>The folder structure unfolded like a map of a city I’d never visited. Patterns I didn’t recognize. A monorepo so large it had its own weather system. Somewhere, a build process was running, and it was in absolutely no hurry.</p><p>I nodded along as he walked me through things. I said “ah, interesting” at appropriate intervals. I was performing the facial expression of a person who understood what was happening.</p><p>Inside, I was running on pure static.</p><h3>The Dizziness</h3><p>At some point in the afternoon, I stood up to get water and realized the room was tilting slightly.</p><p>Not dramatically. Not movie-style. Just… a quiet, persistent suggestion from my body that things were perhaps not entirely okay. My legs felt like they were borrowing confidence they didn’t have. My head was somewhere between <em>present in this office</em> and <em>orbiting slowly above it</em>.</p><p>I found a quiet corner — a stairwell, I think — and just stood there for a moment.</p><p>It’s funny, the things your body holds onto without telling you. I had spent weeks wrapping up projects, saying goodbyes, convincing myself this was just a job change. A normal, adult, career-growth kind of decision. But somewhere in the machinery of me, it had been registering something else entirely: <em>you are leaving home</em>.</p><p>And now, standing in a stairwell that smelled faintly of industrial cleaning products, my body was submitting its formal complaint.</p><h3>Imposter in the Building</h3><p>I went back to my desk. Opened the codebase again. This time with the specific energy of someone who has accepted that they are, temporarily, completely lost.</p><p>The imposter syndrome had arrived — as it always does — not dramatically, but matter-of-factly, like an uninvited guest who helps themselves to your fridge. <em>These people all know what they’re doing</em>, it said. <em>You don’t even know what this component does. You’ve been faking it for years and today is the day everyone finds out.</em></p><p>I want to tell you I had some profound response to this. A mantra, maybe, or a stoic reframe.</p><p>What I actually did was eat a snack, drink some water, and ask my buddy a question I already half-knew the answer to, just to hear someone explain something in a way that made sense.</p><p>And then I asked another question. And another.</p><p>Slowly — not that afternoon, but over the days that followed — the map started to have landmarks. The patterns started to have logic. The new stack stopped feeling like a foreign language and started feeling like a dialect I was learning. I found the bathroom. I found the good coffee. I found, one conversation at a time, people I actually liked.</p><h3>What I Know Now</h3><p>Leaving somewhere you’ve spent years isn’t just a career decision. It’s a small kind of grief — quiet and easy to miss, but real. You’re not just changing jobs. You’re leaving behind colleagues who became friends, a codebase you understood deeply, a rhythm of days that had become second nature.</p><p>And when you arrive somewhere new, you don’t just feel like a beginner at the job. You feel like a beginner at <em>existing there</em>. Every small thing — where to sit, who to ask, how the meetings run — requires conscious effort that used to be automatic.</p><p>The dizziness, I’ve since decided, was just all of that landing at once.</p><p>It passed. Most things do.</p><p>And if you’re somewhere in the middle of your own version of this — standing in a metaphorical stairwell, legs uncertain, codebase incomprehensible — I’ll just say: drink some water. Ask the obvious question. Give yourself the two to four weeks it actually takes for a new place to start feeling like somewhere you belong.</p><p>You’ll find the bathroom eventually.</p><p><em>Still learning the new stack. Still occasionally nodding along. Getting better at both.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d330eca32240" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we use Composition API as Vuex alternatives]]></title>
            <link>https://raditia.medium.com/how-we-use-composition-api-as-vuex-alternatives-6fe1da402b8c?source=rss-ecfa7fd3fcd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fe1da402b8c</guid>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[composition-api]]></category>
            <category><![CDATA[vuex]]></category>
            <dc:creator><![CDATA[raditia]]></dc:creator>
            <pubDate>Fri, 01 Apr 2022 04:36:55 GMT</pubDate>
            <atom:updated>2022-04-01T04:36:55.085Z</atom:updated>
            <content:encoded><![CDATA[<p>Changes in UI state without the user needing to refresh became one of the standards in today’s modern web apps. And in development, some of these states are often used repeatedly in many places. So to reduce the repetition of writing the same state, we will make the state accessible in many areas — a global state. Another reason we need this global state is that changes in the UI sometimes depend on specific states; for example, the UI in part A will change when the state in UI part B is triggered.</p><p>In React, Redux is often used to set the global state and the flow of changes. Likewise with Vue, which uses Vuex. Now, the use of Redux/Vuex is critical and cannot be separated because this global state is a common thing in today’s web apps.</p><p>When Vue introduced its latest version, one of the highlights of the feature was the Vue Composition API which was discussed in my previous article.</p><p><a href="https://raditia.medium.com/partially-different-way-to-build-component-using-vue-composition-api-d39cb9f2a7e4">(Partially) Different Way to Build Component using Vue Composition API</a></p><p>We found that the composition API gives developers more freedom in creating components, <strong>including using reactive properties outside of the components.</strong> This article shares how we use the composition API as an alternative to Vuex in creating global state management.</p><blockquote><strong>Note</strong>: In this article, we use Vue 2 by using the vue-composition-api library. If you’re using Vue 3, this feature should be included.</blockquote><p>For the implementation, we created a composable directory for the folder structure to hold all state files — can also name them with compositions. We use the use- prefix as a marker for naming the file that is the file used for state management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*G5ODDA7cPDpsEUdACvP38g.png" /><figcaption>folder structure</figcaption></figure><p>Take, for example, the file useUser. The naming itself is unrestrained, but we try to use the prefix to signify that it is a composable file. In this file, we create a structure that is almost similar to Vuex. State for reactive properties, a method for changing state value, and a dispatch method.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c73f9bf170c1731490636c805aafb46/href">https://medium.com/media/1c73f9bf170c1731490636c805aafb46/href</a></iframe><p>That’s it! Now we can use userData in any component we need. We can also call the fetchUserData method of the component that requires it. Like Vuex, we want the state value to be changed only by this setUserData. To prevent the value of this state from changing outside the composable, we can add read-only to toRefs so that the value in this state cannot be changed outside this composable.</p><p>We will then use this file in one of the components we have created. In this example, we are trying to fetch user data from Github, then display it on the page.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6829c7ddf691a6f9a481105833e6daa5/href">https://medium.com/media/6829c7ddf691a6f9a481105833e6daa5/href</a></iframe><h4>Sharing Across Modules</h4><p>Let say, your web apps is consist of several UI modules, as illustrated in the following simple diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*Mif19Uk_-QaHAia95bAuOw.png" /></figure><p>Suppose you find a condition where some of your modules require data from the same state. In that case, module A and module D need userData. We can create a composable in the UI container and then make the composable file a global property in your Vue application. Then, we can access it through a property statement using <a href="https://blog.logrocket.com/accessing-properties-globally-in-vue-js-with-prototypes/#:~:text=To%20create%20a%20global%20property%20in%20your%20Vue%20application%20and%20then%20access%20it%20through%20a%20property%20statement%20instead%20of%20an%20import%20statement%2C%20Vue%20provides%20a%20platform%20we%20call%20prototypes">Vue.prototype</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f3e5c000fab146bdcc47f652cb1a27f3/href">https://medium.com/media/f3e5c000fab146bdcc47f652cb1a27f3/href</a></iframe><p>Any module component that needs that data can access it via <a href="https://raditia.medium.com/partially-different-way-to-build-component-using-vue-composition-api-d39cb9f2a7e4#:~:text=Emitting%20Custom%20Events%20using%20Context">Context</a> root.$useUser</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/269d3e12b83f17585fddfc075e465315/href">https://medium.com/media/269d3e12b83f17585fddfc075e465315/href</a></iframe><p>Every time there is a change in the state data in the UI container, all module components that use that data will also be updated.</p><h4>Conclusion</h4><p>The Composition API provides flexibility in creating global states. We can also be creative and make custom functions with these composable files according to the needs of our application without sticking to the rules provided by Vuex. In fact, we can also make this composable as a substitute for mixins.</p><p>However, by using this method, it is still possible to mix and match with Vuex if needed. This is just an example of how we can create a global state and share it across multiple components — even modules without using Vuex.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fe1da402b8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Partially) Different Way to Build Component using Vue Composition API]]></title>
            <link>https://raditia.medium.com/partially-different-way-to-build-component-using-vue-composition-api-d39cb9f2a7e4?source=rss-ecfa7fd3fcd1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d39cb9f2a7e4</guid>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[vue-3]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[vue-composition-api]]></category>
            <dc:creator><![CDATA[raditia]]></dc:creator>
            <pubDate>Thu, 19 Nov 2020 09:43:35 GMT</pubDate>
            <atom:updated>2020-11-19T09:43:35.884Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WSa0Xc7YxI1IpUNPUBgVTg.jpeg" /></figure><p>In September 2020, Vue.js released their latest version, Vue 3, which gave us quite a lot of changes. Yet in this article, I will focus on one of the significant changes, namely the Vue Composition API. But before that, here’s a summary of some of the updates to Vue 3 and why we should give it a try.</p><h3><strong>Why Vue 3?</strong></h3><ul><li>Smaller + faster</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zPcZHQP8CGHS8lpj6C8Wyw.png" /></figure><ul><li>Improved Typescript support</li><li><strong>Composition API</strong></li><li>Multiple root nodes on template (we can only have one root on Vue 2)</li><li>Multiple v-model on components</li><li>Suspense<br>component that renders fallback content instead of your component until a condition is met such as a loaded backend API</li><li>Portal<br>allows you to display blocks of code anywhere in the app (modals, notifications, etc)</li><li>Provide/Inject</li></ul><h3>Vue Composition API</h3><p>In Vue 2, we know about the Option API model that we have used frequently in creating Vue components. Then what is the Composition API? In short, all the reactive data, computed, watch, methods we use in the Option API are now wrapped inside a setup() function..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sj1iH0l1ngrJmB3pmqafvQ.png" /></figure><p>The Composition API is an alternative way of writing the logic behind our components. And it was introduced because we might face two main limitations or issues when building bigger Vue apps. In smaller and medium-sized apps, we will very likely never face those issues, but in bigger apps, we might face them. One of the issue is that the code that belongs together logically is actually split up across multiple options, data, methods, computed. Second issue is that re-using logic across components could be tricky and cumbersome.</p><h4>ref</h4><pre>import { ref } from &#39;vue&#39;</pre><p>ref is used to create reactive properties such as to keep track of user input, or to create reactive variables or objects. ref is a wrapper object where the value of our property is stored in another property called .value. So, if we want to call our properties we should access it by typing propertyName.value</p><h4>ref vs reactive</h4><p>Apart from ref, we can also use reactive() to create a reactive property. We can use ref when the variables we create are in the form of strings, numbers, Boolean, etc. When dealing with objects, I recommend using reactive(). If we use ref, it will wrap our value inside the object .value. reactive() doesn’t wrap our object with values so we can immediately access it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/62ed21a97ff5abb6d9e36f9edecc9c1f/href">https://medium.com/media/62ed21a97ff5abb6d9e36f9edecc9c1f/href</a></iframe><h4>watchers</h4><p>In Vue 2 we can only define one dependency if we use optional API, now we can define multiple watchers which return array. Here is the differences in how we define watchers in Vue 2 and Vue 3</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5613c8ee253ed3c8cc3a14f516fc22e/href">https://medium.com/media/f5613c8ee253ed3c8cc3a14f516fc22e/href</a></iframe><h4>Props with composition API</h4><p>In Vue Option API, we could access props by typing this.propsName . But in Vue Composition API, we use props as a parameter inside the setup() method.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b8eeacfaabe088a4c7d9387d7634f9a7/href">https://medium.com/media/b8eeacfaabe088a4c7d9387d7634f9a7/href</a></iframe><h4>Emitting Custom Events using Context</h4><p>There are cases when we need to emit data from child to parent. In Vue 2 we are familiar with using this.$emit(‘emitName’, data). But we can’t do this method in Vue 3, since we don’t have access to this in setup(). Thus, to emit events, we need to use a context object.<br>Context is the second parameter of setup(). When we try to see the contents of the context by doing console.log() there are 3 properties, namely attrs, emit, and slots. attrs are any fall through attributes you might have. slots gives you access top any slot data you might have in your component. emit is a function you can call to emit a custom event</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*ELJ65Vl9qwBUKBoxZnY5JQ.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1999a6fbaef310cdef54df50f914e05/href">https://medium.com/media/e1999a6fbaef310cdef54df50f914e05/href</a></iframe><h4>Provide/Inject</h4><p>We can use props when passing data from parent to child. Of course, it will be very easy if we pass data to a child that is only one level below the parent. But what if the component structure is like this?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KelduOjzBHT1sSonvJ3Tdw.png" /></figure><p>We could either make child 1 receive props from the parent then pass the props data to child 2 or use state management. The first option seems to be inefficient since we add props in child 1 just to pass the data to the next children component — child 1 has nothing to do with the data. But there is another approach offered by Vue, namely by using Provide / Inject.</p><p>Provide / Inject is a capability where parent components can serve as dependency provider for all its children, regardless how deep the component hierarchy is.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d3ff2e69b17f55321b5205ae785bf7ad/href">https://medium.com/media/d3ff2e69b17f55321b5205ae785bf7ad/href</a></iframe><blockquote>It actually possible if you want to update the ref value in the child component but it is not recommended. <strong>You should always change injected values in the place where you provide them</strong></blockquote><p>To add reactivity between provided and injected values, we can use a <a href="https://v3.vuejs.org/guide/reactivity-fundamentals.html#creating-standalone-reactive-values-as-refs">ref</a> or <a href="https://v3.vuejs.org/guide/reactivity-fundamentals.html#declaring-reactive-state">reactive</a> when providing a value.</p><p>To ensure the data passed through cannot be mutated by the injected component, we can use readonly() when passing the data.</p><pre>provide (&#39;name&#39;, readonly(name))</pre><h4>Lifecycle Hooks</h4><p>In Vue 2, we have, beforeCreate and created in the options API, and we could simply add those methods to our config object. How does this look like with the composition API? With the composition API, we don’t add those lifecycle hooks to our component config object anymore, instead we have functions which we can import from vue, which you can call inside of the setup() method. But for beforeCreate and created there actually is no equivalent, because these hooks are not needed here, because the setup() method basically runs at the same time beforeCreate and created ran in the past. So setup() replaces these hooks. Whatever you would have done in created or beforeCreate should be done in the setup() method itself. Now for beforeMount and mounted, it’s different. There we have the onBeforeMount and onMounted functions which can be imported from vue. For beforeUpdate and updated it’s similar and the same for beforeUnmount and unmounted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XlPBd-xaq-NuvMVV6N9bsQ.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9bf1efef35773824f2ab6737b4448220/href">https://medium.com/media/9bf1efef35773824f2ab6737b4448220/href</a></iframe><h4>Vuex 4.0</h4><p>Vue 3 also changed the way we access the store since we don’t have access to this.$store in setup hook. To access the store within the setup hook, you can call the useStore function. This is the equivalent of retrieving this.$store within a component using the Option API.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2fbceb10bd0aca248f80575e9e15dd6a/href">https://medium.com/media/2fbceb10bd0aca248f80575e9e15dd6a/href</a></iframe><p>To access the state and getters, we have to create computed references to retain reactivity, and to access mutation and action we could just simply use the commit() and dispatch() like we used to do in Vue 2.</p><p>We usually use mapGetters and mapActions in our components with the Options API. In Composition API we could use vuex-composition-helper by installing this <a href="https://github.com/greenpress/vuex-composition-helpers">package</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8ba08148ad780491f082184c9d5d709/href">https://medium.com/media/a8ba08148ad780491f082184c9d5d709/href</a></iframe><p>First we import the useGetters and useActions, and then we create a constant which the name is the getter/action name — using object destructuring, and the last we expose the constant into our template. This way is easier to use when we are dealing with modules. So for example, if the incrementCounter is inside the counter modules, we could write it like this</p><pre>const { incrementCounter } = <br>useActions(&#39;counter&#39;,[&#39;incrementCounter&#39;])</pre><h4>Summary</h4><p>Here are the brief differences between Option API and Composition API</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7-nsuqrAetZMyWff8DrHfg.png" /></figure><p>We no longer use data(), instead we use ref() and reactive() to create reactive properties. We don’t define methods but create and regular javascript function inside the setup() hook and then expose it to the template. We could have multiple watchers that return an array, and a lot more. You can find the complete documentation about Vue 3 and Vue Composition API <a href="https://v3.vuejs.org/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d39cb9f2a7e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>