Hint: It's not all about diversification
Bonds have been in focus recently due to the rising interest rates environment we have entered into. This is because Bonds and Interest Rates share an Inverse relationship - if interest rates go up bonds prices go down. If Interest rates go down bond prices go up. Therefore, if interest rates are going up almost all bonds are going to be hurt
Even though interest rates may be rising I think there is still a role for them in your portfolio. And that is to preserve cash flows. Depending on your goals and resources you may need cash from your portfolio within a certain number of years. When you invest in bonds especially the right kind of bonds, you have removed a portion of your portfolio from the fluctuations of the stock market. You can sleep well knowing that the part of your portfolio that you need is set aside in your bond portfolio. Then if there is a bear market you do not need sell your stocks at an inopportune time. This makes you a "Patient Seller". You can now wait for the market to recover to sell your stocks. Being in this position is gives you the power to not panic in any bear market. You have already done your homework ahead of time and used your financial plan as a guide to determine your cash flow needs and invested that portion of your portfolio in Bonds.
The key is to invest in the right bonds. Make sure they are Good Quality and Short-Term (1-5 years). By good quality I mean High-Grade bonds rated AA or AAA. If investing in Municipals make sure they are General Obligation bonds as opposed to revenue bonds. Stay far away from Junk Bonds and Long-Term Maturities as these tend to get hit the hardest in a Bond Bear Market.
There are other factors that should be considered when determining your Asset Allocation but calculating your cash flow needs should be at least one big factor that you are looking at.