DEV Community

swyx
swyx

Posted on • Edited on

3

Make your own Dev.to CMS livestream - Part 4

This is day 4 of my livecode Dev.to CMS.

Source: https://github.com/sw-yx/dev-to-cms
Demo: https://dev-to-cms.now.sh

Things covered

  • [x] Redirect to edit after posting
  • [x] Markdown preview with toggles
  • [x] Async status -> nicer UX when clicking submit

Video

Here is the YouTube livestream (3 hours).

Dev.To embed:

Today we fixed some bugs in the codebase and found new ones!

Catch up on the Dev.to CMS LiveStream!

Top comments (2)

Collapse
 
quowtf profile image
Roberto Esteban

Hi swyx, what is that alias 'gadmit' you use to commit your changes stands for?

Collapse
 
quowtf profile image
Roberto Esteban

Found it 😬
gist.github.com/sw-yx/7fa1009e460e...

alias gadmit="git add . && git commit -m"

typescript

11 Tips That Make You a Better Typescript Programmer

1 Think in {Set}

Type is an everyday concept to programmers, but it’s surprisingly difficult to define it succinctly. I find it helpful to use Set as a conceptual model instead.

#2 Understand declared type and narrowed type

One extremely powerful typescript feature is automatic type narrowing based on control flow. This means a variable has two types associated with it at any specific point of code location: a declaration type and a narrowed type.

#3 Use discriminated union instead of optional fields

...

Read the whole post now!

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay