The 8350 is a lot better than the 6300. On many next gen PC games the 6300 doesn't meet minimum PC requirements. It will run, but not great. The 8350 will meet the requirements and in most cases even meet recommended settings. I can tell you from personal experience because I had a 6300 and I went with a 8350 because I found a used one for 25.00 and now I can play Fallout 4, Mass Effect Andromeda and Witcher 3 at 1080 on ultra settings. With the 6300 it was on low settings.
Yes, a Ryzen would be better, but you would also need a new motherboard, new RAM, etc. So if you are on a budget and wanting something for now, the 8350 is the better option until you can afford to do a larger upgrade.