The Daily Subset

Share this post

{27} State Management, Content Calendars & Recognition

www.dailysubset.com

{27} State Management, Content Calendars & Recognition

Featuring Fig, Naresh, David K., Vourneen, and Roberto Ferraro

Dane Lyons
Feb 14
Share this post

{27} State Management, Content Calendars & Recognition

www.dailysubset.com

Dane Lyons is a startup vet with hot takes and eclectic knowledge writing for the aspiring generalist.


Tools: Fig

Fig.io

Twitter avatar for @fig
Fig @fig
🎉 We’re incredibly excited to announce that Fig is now publicly available for _anyone_ to download! 130 contributors, 200+ CLIs, 4k community members, 10s of thousands of users, and 10s of millions of autocompletes... And we're just getting started 🔥 fig.io/blog/post/laun…
fig.io🎉 Launching FigA discussion of Fig’s mission and vision on the day of our general availability launch.
4:20 PM ∙ Nov 18, 2021
1,656Likes360Retweets

I’m excited about the future of command line tools. The terminal used to be a cryptic space for backend wizardry. But companies like Fig are continually improving the developer experience. Each improvement makes writing commands more approachable. I hope we get to the point where the CLI a tool for backend wizardry and “no-code developers”.

I plan to turn Subset into a collection of open-source publishing tools. I’ll explore using Fig to do a lot of the heavy lifting for setup and configuration. I’ll share an update soon!


Design: Highlight Common Options

Naresh

Twitter avatar for @naresh_io
Naresh @naresh_io
💡 UI/UX Tip #49 List the most used options at the top ✅ Easy to access ✅ Less effort for the user #uidesign #UXTips
Image
3:30 PM ∙ Nov 28, 2021
36Likes4Retweets

It can be very frustrating to select a single option from a very long list. You can often narrow the list by typing, but that doesn’t always work well in practice. Being reasonably smart about showing what option will most likely be selected is a much nicer experience.

In the example of selecting a country, you could use javascript to detect the user’s preferred language.

navigator.language

You’ll get back a language tag. This can be used to map to suggested countries that are highly likely to be selected. For me, I get ‘en-US’, which maps to ‘United States’.

An even better solution would be to detect the preferred language and preselect the most likely option. Then the user doesn’t even have to interact with the selector if you are correct.


Development: React useReducer vs useState

David K.

Twitter avatar for @DavidKPiano
David K. 🎹 @DavidKPiano
⚛️ Here's a fun React tip: `useReducer` is a better `useState`, and it's easier to adopt than you may think. Group related values together and spread them in the reducer. Then, updating is just: updateThing({ prop: newValue }) And there's even more benefits to `useReducer`...
Screenshot of React code showing two approaches to updating state:

Separate useState hooks: 
  const [message, setMessage] = useState('');
  const [tags, setTags] = useState([]);
  const [status, setStatus] = useState('active');

Single useReducer hook:
  const [todo, updateTodo] = useReducer(
    (data, partialData) => ({
      ...data,
      ...partialData,
    }),
    { message: '', tags: [], status: 'active' }
  );
Screenshot of React code showing the difference between updating a value:

Updating with useState:
        onChange={(e) => {
          setMessage(e.target.value);
        }}

Updating with useReducer:
        onChange={(e) => {
          updateTodo({
            message: e.target.value,
          });
        }}
4:04 PM ∙ Dec 19, 2022
3,380Likes433Retweets

People avoid useReducer because the useState syntax is more intuitive. I’ve certainly fallen into the trap of trying to update a complex data structure with a series of separate useState hooks. Updates get harder and harder to manage, and it’s easier to make mistakes.

I’d recommend useState for variables that are “independent” and useReducer for objects of interdependent properties.

const [darkMode, setDarkMode] = useState(false);
const [article, updateArticle] = useReducer(
  (data, partialData) => ({
    ...data,
    ...partialData
  }),
  { title: "", descrition: "", tags: [], status: "draft" }
);

Marketing: Content Calendar

Vourneen

Twitter avatar for @VourneenMcE
Vourneen @VourneenMcE
Do you have a content calendar, or do you just wing it and post whenever?
4:20 PM ∙ Feb 10, 2023
11Likes1Retweet

I’m definitely in the “wing it” camp, mainly because I work independently. I assume content calendars are more common in larger teams requiring coordination.

This has me thinking about alternative solutions. Content calendars are a “safe solution” because they optimize for reliability. But what if you take less of a planning and more of an opportunistic approach to creating value? Teams that are “over-utilized” because their time has been preallocated through rigorous planning lose the ability to adapt.

I often think about bounty systems as a way of creating timely incentives without dictating how people invest their time. Some bounties could be safer long-term bets that might mimic content calendars today. i.e. create an asset for an upcoming holiday for $$.

But imagine if your team doesn’t feel tethered to the low-risk bets. Let’s say the next version of ChatGPT is released, creating an opportunity to be a leader in the ensuing conversation. So your team creates a bounty, “Write the ultimate guide to prompt hacking ChatGPT v2 for $$$$$”. Someone on the team should be free to drop everything and spend the next 48 hours putting together the internet’s go-to guide for the next 12+ months.

People should be free to shed prior obligations to pursue high-value opportunities.


Team: Recognition

Roberto Ferraro

Twitter avatar for @FerraroRoberto
Roberto Ferraro @FerraroRoberto
“People will forget what you said, people will forget what you did, but people will never forget how you made them feel.” Maya Angelou
Image
5:29 AM ∙ Jan 23, 2023
113Likes22Retweets

Inspired by Valentine’s Day, I thought I’d cover the importance of recognition. I’m admittedly not great at giving positive reinforcement. It doesn’t occur to me that people might need it.

This stems from a self-reliance mindset. By default, I don’t tend to seek out external validation. In some ways, this is freeing, but it can also be isolating.

I’m not suggesting it is wrong to feel good when people say nice things. An over-dependence on external validation is probably unhealthy. But it’s perfectly natural to want to share your accomplishments.

Regardless of how you feel about recognition, it’s good to know people around you need it. It’s not hard to be generous with your words, just don’t be inauthentic. When someone accomplishes something, big or small, make it a point to show appreciation.


Thanks for reading The Daily Subset!

Share this post

{27} State Management, Content Calendars & Recognition

www.dailysubset.com
Previous
Next
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 Dane Lyons
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing