Q: How did you become an author for Packt? Tell us about your journey. What was your motivation for writing this book?
Daniel: I’ve been a massive fan of React Query since Tanner Linsley did his “React Query: It’s Time to Break up with your Global State!” talk at React Summit. The separation of concerns it brought to dealing with states made a lot of sense and fit right in with an issue I had at work back then. Since then, I’ve been using React Query in all my projects, and I’ve lost count of the hours it saved me and allowed me to ship quality code faster to production.
Because I love React Query so much, I often tweeted about it and even posted about my experience using it. When Packt reached out with this opportunity to write about React Query, I knew it would be an instant yes from my side. Finally, an opportunity that allowed me to grab all my knowledge of this great library and share it with the world.
Q: What is the name of your book?
Daniel: State Management with React Query: Improve developer and user experience by mastering server state in React
Q: What kind of research did you do, and how long did you spend researching before beginning the book?
Daniel: From the start, I knew what would be my approach with this book. I grabbed all the things I’ve struggled with and tried to create a storyline to help readers fully understand the value of React Query. From this point, it was all about getting all the basics, recipes, and patterns I’ve applied throughout the years of using the library.
Q: Do you have a blog that readers can follow?
Daniel: I do, https://www.danieljcafonso.com/
Q: What key takeaways do you want readers to come away with from the book?
Daniel: I want people to start thinking about how they are managing the state right now. It is important to have a separation of concerns, and React Query fits right in alongside your client state management solutions. Once this concept lands with people, I would love for readers to leave this book ready to use React Query in the production apps. This means configuring it, using it, and being able to test applications using it.
Q: Can you share any blogs, websites and forums to help readers gain a holistic view of the tech they are learning?
Daniel: For me, Twitter is pretty much the place I use to get knowledge from all the amazing people I follow and admire.
Q. Did you face any challenges during the writing process? How did you overcome them?
Daniel: The biggest challenge was that a new major version of TanStack Query was announced when I was getting ready to wrap up writing the book. Due to this, I had to do some extra planning and decided to add a bonus chapter that allowed the book to still be exciting and helpful after the new major release.
Q. How would you describe your author journey with Packt? Would you recommend Packt to aspiring authors?
Daniel: I loved my experience with Packt. Throughout the process of writing the book, I never felt alone. My assigned team always supported me and kept me motivated throughout the months I took to finish the book.
Q. Why should readers choose this book over others already on the market? How would you differentiate your book from its competition?
Daniel: Well, the answer to this question is: as I am aware, there is no other book on the market entirely about React Query. Also, one of the things that makes this book shine a lot is that I put my twist on how I explain concepts, and you should be able to feel that. For instance, I’ve always been the “testing guy” in previous jobs, and you can feel that love for testing in Chapter 8.
Q. What is/are your specialist tech area(s)?
Q. What advice would you give to readers jumping into this technology? Do you have any top tips?
Daniel: Only one, don’t use it to manage client state 😉
Q. What’s your take on the technologies discussed in the book? Where do you see these technologies heading in the future?
Daniel: I see React Query being around for many years. The maintainers are doing a fantastic job, and I still think it is the best server state management library out there.
Q. How did you organize, plan, and prioritize your work and write the book?
Daniel: As I said previously, I wanted people to understand the need for React Query; therefore, it made total sense that this would be my starting point. From this point on, I outlined the points that I thought would be relevant for each concept and aligned with the general flow and view I had for the book.
Regarding the writing part, it felt natural. I wrote each chapter individually, and if I remember I missed something in a previous chapter during the writing, I would go back to it and complement the missing knowledge. It felt like writing a huge blog post series. Except this one took around eight months to wrap up 😀
Q. What are your favorite tech journals? How do you keep yourself up to date on tech?
Daniel: I would say I keep myself up to date by following the right people on Twitter. If you know who to follow, you can learn from the best and keep yourself aware of everything happening in tech.
Q. Would you like to share your social handles? If so, mention them below.
Q. What is that one writing tip that you found most crucial and would like to share with aspiring authors?
Daniel: When planning to wrap up your writing for the day, stop when you still feel excited about what you are writing. This process helped me return to the writing process the day after because I kept the hype from the previous day.
You can find Daniel’s book on Amazon by following this link: Please click here