You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the text on the website is cluttering up the code making it hard to understand and debug. This needs to be fixed.
Solution
We can move the text (not the HTML tags) into JSON files then import those json files into the TSX and access those object attributes like a normal object. This cleans up the code massively. Examples can be seen below:
JSON File:
{
"introduction": [
"Over the years, I have developed a passion for ...",
"The following section is a ..."
],
...
}
Then the TSX file where we import the JSON file contents:
Abstract Content into JSON Files
Problem
All of the text on the website is cluttering up the code making it hard to understand and debug. This needs to be fixed.
Solution
We can move the text (not the HTML tags) into JSON files then import those json files into the TSX and access those object attributes like a normal object. This cleans up the code massively. Examples can be seen below:
JSON File:
Then the TSX file where we import the JSON file contents:
The text was updated successfully, but these errors were encountered: