Should I block him?

Me and my ex broke up because things just weren’t going to work out at all and it was causing us both a lot of stress. We talked it out and he said that neither of us had hard feelings and that we can still be friends later. I want to block him on Snapchat and other social media so I can resist the urge to text him and see what he’s up to. Is this a bad idea since he still wants to be friends?