<?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 Andi Winata on Medium]]></title>
        <description><![CDATA[Stories by Andi Winata on Medium]]></description>
        <link>https://medium.com/@andi.winata?source=rss-cd3c14db1ff0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wTVxh1rl8dzyKNVbUgCE2A.jpeg</url>
            <title>Stories by Andi Winata on Medium</title>
            <link>https://medium.com/@andi.winata?source=rss-cd3c14db1ff0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 12:24:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andi.winata/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[How technology has fundamentally changed Jakarta within a year]]></title>
            <link>https://medium.com/@andi.winata/how-technology-has-fundamentally-changed-jakarta-within-a-year-fac6e910d0cf?source=rss-cd3c14db1ff0------2</link>
            <guid isPermaLink="false">https://medium.com/p/fac6e910d0cf</guid>
            <category><![CDATA[lifechanging]]></category>
            <category><![CDATA[jakarta]]></category>
            <category><![CDATA[ridesharing]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[fintech]]></category>
            <dc:creator><![CDATA[Andi Winata]]></dc:creator>
            <pubDate>Fri, 31 Jan 2020 12:06:11 GMT</pubDate>
            <atom:updated>2020-01-31T12:30:39.252Z</atom:updated>
            <content:encoded><![CDATA[<p>This is an observation from an Indonesian who’s working overseas after coming back to Jakarta for a short while.</p><h3>Ride-hailing</h3><p>Chances are, once you are travelling inside Jakarta, you will see a lot of motorcyclists wearing a green jacket. Compared to last year, there was much less ‘greens’ on the roads as opposed of now, these riders are what Indonesian call ‘Ojek Online’ — it is a ride-hailing system where you can call these riders using the app to lift you to your destination (similar to Uber or Lyft, except most of the people here are using motorcycle, however, they do have the car services too).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*w6yUo3MxcKvaWU6R" /><figcaption>Grab drivers</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*lVKPhh5_KiBySCAj.jpg" /><figcaption>Gojek drivers</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*aKB9KT4Q_uAzeNt5.jpeg" /><figcaption>Image from <a href="https://ekonomi.bisnis.com/read/20191112/98/1169620/berapa-sih-jumlah-pengemudi-ojek-online-simak-penelusuran-bisnis.com#">https://ekonomi.bisnis.com/read/20191112/98/1169620/berapa-sih-jumlah-pengemudi-ojek-online-simak-penelusuran-bisnis.com#</a></figcaption></figure><p>The Ride-hailing scene in Jakarta is dominated by two big companies, Gojek and Grab, and since both companies are using green as their brand colour, hence why I mentioned it as ‘greens’. As for other ride-hailing companies: Uber used to be in Jakarta with ‘yellow black’ colour, however, Uber lost the market in South East Asia.</p><p>These two companies have fundamentally changed Jakarta inhabitants life, they become the preferred way for a massive amount of people to move between locations, replacing most of the other transportation mode to get from one point to the other (except for some public transport). In daily conversation aspect, ‘Gojek’ and ‘Grab’ are slowly transforming into a verb, the same way people using the word ‘Google’ as a verb.</p><p>In the past, in order to get ‘Ojek’ (the motorcycle transport service), you will need to go to a certain location to get them, or just by pure luck you can differentiate them from normal motorcyclist on the way. Nowadays, with the help of technology, it is really easy to find a driver with just a few clicks away.</p><p>Given the enhanced discoverability, flocks of people jumping in to become a driver, since Jakarta particularly has tons of human resources. This resulted in 1 out of 25 people in Jakarta metropolitan area is a driver (1.25 million drivers in Jakarta metropolitan area(1) with a total population of 31 million).</p><p>Gojek and Grab didn’t stop just by having people transportation, they have expanded themselves into a super app, following China’s Alipay and WeChat — with businesses in food, parcel, grocery, medicine delivery, car rental, masseur delivery and even booking a taxi — which market they disrupted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/0*2hU-ocZ_Ibcxr1ED" /><figcaption>Interface of Gojek app — it has multiple services and moving towards super apps</figcaption></figure><h3>Rise of fintech and burning money</h3><p>Both Gojek and Grab have also expanded into finance, from as a payment method to paying bills and topping up mobile data. Gojek created GoPay while Grab is partnering with OVO (a financial technology in Indonesia)</p><p>These payment systems work similar to how WeChat and AliPay works, you transfer your money into the account and then use it with QR Code as a payment system, focusing mainly for business to consumer transactions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*nyIrgDlLxZsd7xbA" /></figure><p>Since they just recently started the payment, both companies are aggressively trying to acquire the market share by having cashback sphere a.k.a. burning money. Both companies are giving cashback for every purchase to a variety of merchants, the cashback goes from lower amount around 10% to 60–70%, there was a time that they even go through 100% cashback.</p><p>The cashback are quite different from the typical cashback website as they are instantaneous, no need to wait for few weeks or months; though the cashback will have a max limit per transaction, and usually it is not that large. Both of these companies constantly trying to one-up each other, depending on the merchants.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*SlP9zn1wMgO7U8LY" /></figure><p>After sometime, more and more competitors jumping in into financial tech, from existing big banks into another startup, fueling more and more money into the furnace, up until the point the consumers will ask the seller which cashback to use for the best value for their specific amount of purchase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/0*rnnr4AeaASb-D6D_" /></figure><p>This discount sphere has been very intriguing for me since this has fundamentally changed people way to pay, and in comparison, I have never seen something like this personally happening in Sydney where I am currently residing.</p><p>In the end, this growth in fintech is encouraged by government(3) since across the nation, there are 92 million people do not have a bank account half of the adult population(4).</p><p>Sources:</p><ol><li><a href="https://bisnis.tempo.co/read/1271465/berapa-jumlah-pengemudi-ojek-online-di-indonesia/full&amp;view=ok">https://bisnis.tempo.co/read/1271465/berapa-jumlah-pengemudi-ojek-online-di-indonesia/</a></li><li><a href="https://fortune.com/longform/grab-gojek-super-apps/">https://fortune.com/longform/grab-gojek-super-apps/</a></li><li><a href="https://www.thejakartapost.com/life/2019/08/14/the-top-five-e-wallet-apps-in-indonesia.html">https://www.thejakartapost.com/life/2019/08/14/the-top-five-e-wallet-apps-in-indonesia.html</a></li><li><a href="https://www.liputan6.com/bisnis/read/4080670/92-juta-penduduk-indonesia-belum-peroleh-akses-perbankan">https://www.liputan6.com/bisnis/read/4080670/92-juta-penduduk-indonesia-belum-peroleh-akses-perbankan</a></li></ol><p><em>Originally published at </em><a href="https://atjong.home.blog/2020/01/31/how-technology-has-fundamentally-changed-jakarta-within-a-year/"><em>http://atjong.home.blog</em></a><em> on January 31, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fac6e910d0cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic explanation of Universal/Isomorphic React App — and mark up mismatch]]></title>
            <link>https://medium.com/@andi.winata/basic-explanation-of-universal-isomorphic-react-app-and-mark-up-mismatch-3a95c53634b8?source=rss-cd3c14db1ff0------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a95c53634b8</guid>
            <category><![CDATA[isomorphic-applications]]></category>
            <category><![CDATA[universal-app]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[server-rendering]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Andi Winata]]></dc:creator>
            <pubDate>Mon, 28 Jan 2019 05:53:18 GMT</pubDate>
            <atom:updated>2019-01-28T05:53:18.919Z</atom:updated>
            <content:encoded><![CDATA[<h3>Basic explanation of Universal/Isomorphic React App — and mark up mismatch</h3><p>First let’s start what does ‘Universal/Isomorphic’ means, this term is used to describe both client side and server side, it means the code (or app) will be executed both in server (e.g. nodejs) and client (browser).</p><p>To explain how it works, I’ll explain it by using a simple example of creating React App, webpack and express will be used in the example.</p><p><strong>First, we’ll create necessary files to be executed in server and client.</strong></p><ol><li>Create React App component</li></ol><pre>import React from &quot;react&quot;</pre><pre>const App = () =&gt; (&lt;div&gt;Hello World!&lt;/div&gt;)</pre><p>2. Create client.js to be run on client side (browser)</p><pre>import React from &quot;react&quot;<br>import ReactDOM from &quot;react-dom&quot;</pre><pre>ReactDOM.hydrate(&lt;App /&gt;, document.getElementById(&quot;app&quot;))</pre><p>3. Then create a simple server using express server.js</p><pre>import React from &quot;react&quot;<br>import express from &quot;express&quot;<br>import ReactDOMServer from &quot;react-dom/server&quot;<br>import App from &quot;./App&quot;<br><br>const app = express()<br><br>app.get(&quot;*&quot;, (req, res) =&gt; {<br>  // render the App component<br>  const serverMarkup = ReactDOMServer.renderToString(&lt;App /&gt;)<br>  res.send(`<br>    &lt;html&gt;<br>    &lt;body&gt;<br>      &lt;div id=&quot;app&quot;&gt;${serverMarkup}&lt;/div&gt;<br>      &lt;script src=&quot;/client.bundle.js&quot;&gt;&lt;/script&gt;<br>    &lt;/body&gt;<br>    &lt;/html&gt;<br>  `)<br>})</pre><pre>app.listen(3000)</pre><p><strong>Then, we’ll run build process to create server and client bundle</strong></p><p>Using webpack to do the bundling for both server and client code, here’s a part of what the build config looks like:</p><pre>//<em> </em>webpack.client.js<em><br></em>module.exports = {<br>  entry: &#39;./client.js&#39;,<br>  output: {<br>    path: __dirname,<br>    filename: &#39;client.bundle.js&#39;<br>  },<br>}</pre><pre>// webpack.server.js<br>module.exports = {<br>  entry: &#39;./server.js&#39;,<br>  output: {<br>    path: __dirname,<br>    filename: &#39;server.bundle.js&#39;,<br>  }<br>}</pre><pre>// then run both build from command line<br>$ webpack --config webpack.client.js<br>$ webpack --config webpack.server.js</pre><p>Here’s a diagram showing what’s going to happen in the build:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oVYq3eNjriYQWWDJOy0BcA.png" /></figure><p><strong>Then we are going to run the server</strong></p><p>After server.bundle.js and client.bundle.js generated, run the server by running the generated server bundle:</p><pre>node server.bundle.js</pre><p>Then navigate to the server in browser <a href="http://localhost:3000`">http://localhost:3000</a></p><p><strong>Here is a diagram to explain what is going to happen when we hit the server</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S0wG_X8Oy_7-ZSp-QTMApA.png" /></figure><p>As you can see, our &lt;App /&gt; component is executed in both server and client, so this is what Universal/Isomorphic App means.</p><p>So that’s basically it! But obviously this is only a simple representation of universal app.</p><h3>Things to avoid or consider in universal app</h3><h4><strong>Usage of specific environment variables</strong></h4><p>As you can see above, the blue-colored part are the code that will run on both server and browse is a React Component. Most of the time React component in universal react app will be run in both server and browser, so it is very important to write the component with that mindset.</p><p>Use caution when using window or document variable, as they are only available in browser. In server (nodejs) accessing window and document will throw an error that may cause server to not return anything or internal error. This also applies to server-only modules, e.g. fs, path, they will throw error when executed in browser.</p><p>The exception for this rule is if you are sure that the code will only be executed in one environment, for example:</p><ul><li>Usage of window or document in client-only life-cycle method is safe. Example of such methods are componentDidMount ,componentDidUpdate, etc.</li><li>If you are sure the component will only be rendered in client (in server it will render null). This is usually done by deferring the component rendering after componentDidMount , like this:</li></ul><pre>class ComponentA extends React.Component {<br>  state = { hasMounted: false };</pre><pre>componentDidMount() {<br>    this.setState({ hasMounted: true })<br>  }</pre><pre>render() {<br>    return hasMounted ? &lt;ComponentB /&gt; : null<br>  }<br>}</pre><pre>// this is safe since ComponentB <br>// is executed only after ComponentA mounted<br>const ComponentB = () =&gt; &lt;div&gt;{window.someVariable}&lt;/div&gt;</pre><ul><li>Or in general, make sure you are in the correct place when you are using the environment variable, server environment executed only in server and client environment variable only in client</li></ul><h4><strong>Markup mismatch</strong></h4><p>Markup mismatch happens when server rendered markup doesn’t match client initial render, in the 2nd diagram above you can see timing when this error occurs.</p><p>There are ways that markup mismatch can happen between server and client, one example:</p><p><strong>Responsive Component</strong></p><p>Say if we’re building a responsive website, we need to include conditionals in some components to change their behaviour in different breakpoint, for CSS we just use the @media, but for react component, let’s make a component to handle responsive behaviours:</p><pre>const MediaQuery = ({ children, minWidth = 0, maxWidth = Number.MAX_SAFE_INTEGER, serverWidth }) =&gt; {<br>  const isRunningInServer = typeof window === &quot;undefined&quot;</pre><pre>// since in this case server doesn&#39;t have access to clientWidth <br>  // (without detecting user agent etc)<br>  // use the prop that we pass on purpose for server width<br>  const currentWidth = isRunningInServer ? serverWidth : document.body.clientWidth<br>  <br>  // check current width is in range of specified width limit<br>  if (currentWidth &gt;= minWidth &amp;&amp; currentWidth &lt;= maxWidth) {<br>    return children<br>  }<br>  <br>  // otherwise don&#39;t render anything<br>  return null<br>}<br><br>// usage<br>const Comp = () =&gt; (<br>  &lt;div&gt;<br>    &lt;MediaQuery minWidth={100} maxWidth={600} serverWidth={1000}&gt;<br>      &lt;div&gt;I am rendered in MOBILE&lt;/div&gt;<br>    &lt;/MediaQuery&gt;<br>    &lt;MediaQuery minWidth={601} serverWidth={1000}&gt;<br>      &lt;span&gt;I am rendered in DESKTOP&lt;/span&gt;<br>    &lt;/MediaQuery&gt;<br>  &lt;/div&gt;<br>)</pre><p>Above component can generate markup mismatch, here is the scenario:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AIDJ3phMP5hyfpdJwweqCQ.png" /></figure><p>So be careful when doing conditional rendering, some ideas to avoid markup mismatch:</p><ul><li>Only use the component if you’re sure it’s only executed in 1 environment (either server or client)</li><li>Use the alternative display: none; from CSS to hide and show components</li><li>Don’t use the MediaQuery component for something that involves rendering markup, use it for invisible components (i.e. renders null )</li></ul><p>There are other ways to cause mark up mismatch, but all of them boils down to different output from render between server and client, so be careful when dealing with rendering with conditional.</p><p>Hopefully this will help some you to understand what is Universal/Isomorphic App is and some things to consider.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a95c53634b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>