profile

Hi! I'm Josh.

Using React's useEffect in WordPress and a preview of something new

Published about 1 year agoΒ β€’Β 1 min read

​

🌱 Stuff I've Written Recently

Using React's useEffect In WordPress

In the last newsletter, I mentioned a post about creating reusable React hooks. Since then I wrote a new post about how to use the useEffect hook in WordPress. This post has several examples of using that hook -- to load WordPress posts via API and to remove admin notices from wp-admin. I also explained how to use the hook to manage pagination, as an example of how the dependencies argument works.

I would appreciate if you would Retoot my toot about it​ or Retweet my tweet about it.​

How Is AI Going To Effect How We Write Code?

Like a lot of folks, I am super interested in AI, but also plenty fearful. Part of it is worrying about my future employment, and part of it is wondering how much longer all this code I learned about is going to matter. Saturday, in between dog walks, I made a quick twitter thread, and later rewrote it into a blog post.

Are you using CoPilot or ChatGPT or anything else to help with your code? I'd be curious to know. Igor Benić tweeted a similar question the other day, I replied and so did a lot of other folks. It's an interesting time to be alive.

🌡Open Source Updates

I am working on Plugin Machine v2 and that means updating my JSON-driven UI abstraction. This version uses React, is open source and very beta. I've talked to a few people about different ways to add fields, blocks, or whatever via a JSON or YAML file. This is is something I've built a few times. It removes a lot of the steps of developing interfaces that have variable amounts of fields, like Plugin Machine does. If this is similar to something you're working on, reply and let me know.

On Github Ben and I discussed releasing a version 1 of our "Headless Mode" plugin for headless WordPress sites -- now with over 1000 head. We merged a filter , contributed by Rachel Cherry to selectively show the default front-end. I'd like to use this to add a UI for that. This will be a good excuse to improve my React admin components package.​

🌲 Good Morning Photos?

Should I be adding some photos to these emails? I know my gm tweets, that are on Mastodon now are appreciated by many of my internet friends. I am worried about message size, your Mastodon client of choice is probably better at handling images efficently. Here are two recent gm photos of things starting to grow.

🌱🌡🌲,

Josh

​

​

​

​

​

​

​

​

​

​

​

Hi! I'm Josh.

Josh Pollock

I write a newsletter about PHP and JavaScript development with WordPress, Laravel and React

Read more from Hi! I'm Josh.

🌱I Pressed The Published Button Last week I sent y'all a message about my upcoming Refactoring WordPress Plugins. I uploaded A version 1.0.0 and pressed publish on everything after finishing up work today. i wanted these books to be useful but also fun. I have been working on this eBook and rebuilding the website as a side project for a while now. I've also been working a lot less. I'm also walking the dog more and the book contains photos of flowers and my dog. I hope if you choose to read...

11 months agoΒ β€’Β 1 min read

πŸ‘‹ Hi Everyone. I'm back from my time off and have some new stuff ready to go. Earlier this year I wrote about my plans to pivot Plugin Machine. The two big new ideas that I talked about were mini-courses or eBooks and a membership. The first eBook I wrote was soft-launched this week. It is completed and on sale on my site. I am still tweaking things and will announce and publish it on Gumroad next week. You can purchase this book standalone or as part of a site membership. I will be...

11 months agoΒ β€’Β 1 min read

Hi! Isn't the intro to a newsletter trying to be all personal always so awkward? Maybe that's just me. Anyway, I wrote some posts about building stuff with AI, using TypeScript and started working on an open-source app with it. 🌱Why LangChain? Last summer I started playing with HuggingFace, but was super busy with actual work to write Python for a side project, since I don't really know Python. Then I started actually building stuff with the openai-php client, including the API server for my...

about 1 year agoΒ β€’Β 2 min read
Share this post