Check out example codes for "css tricks macos spaces in dock". It will help you in understanding the concepts better.

Code Example 1

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'

Learn ReactJs, React Native from akashmittal.com