Week 2 — 3 January, 2022

What I've learned previous week?

Browserlist on package.json

My friend has realized that one of the website he built was not working well on Safari 12. He had used Tailwindcss 3 to style the website and Tailwindcss3 targets to Safari 14+.

So I was looking for a solution to help him and I found of course 😬 The solution was adding "browserlists" into the package.json. Honestly I did not expect it to works but it did 🥳😅

// package.json

{
  .
  .
  .
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all",
      "last 3 safari version" // <-- this is the solution
    ]
  }
}

Manipulate fetched data in react-query

We use react-query most of our projects in Swiftmade. I was looking for a way to manipulate the data already fetched without refetch. I've found this solution: https://react-query.tanstack.com/reference/QueryClient?utm_source=pocket_mylist#queryclientsetquerydata

const queryClient = useQueryClient();
const data = {...};
queryClient.setQueryData('query-key-here', data);

What did I do during previous week?

  • I was working on the projects in Swiftmade. We've completed redesigning of Wrkland's website. It's not released yet 😬 I'm looking forward to share it here when it's released. 🥳 We had built a booking system for them last year. You can check it out for now https://booking.wrkland.com

  • Apart from my daily tasks, I've built a side project in a day 😅 I was using a service to share my all links in a single page. But it's gone I don't understand why 🥺 Then I've decided to built a simple one instead. 🥳

  • I've published a new programming tutorial for my Turkish audience (Let's build a Twitter Clone 👀)

Links