I am using react-icons and I have a JSON file as follows:
social: {
twitter: {
icon: 'FaTwitter',
link: 'twitterlink',
},
linkedin: {
icon: 'FaLinkedIn',
link: 'linkedinlink',
},
github: {
icon: 'FaGithub',
link: 'githublink',
},
}
Run Code Online (Sandbox Code Playgroud)
I am trying to dynamically create the icons by looping through the JSON, but I'm having a lot of trouble making it work.
Here are snippets of what I've already tried so far along with the outputs and the errors produced in the console: …