html-react-parser VS Portfolio2.0

Compare html-react-parser vs Portfolio2.0 and see what are their differences.

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
html-react-parser Portfolio2.0
6 9
1,971 27
- -
9.7 6.4
12 days ago 1 day ago
TypeScript JavaScript
MIT License GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

html-react-parser

Posts with mentions or reviews of html-react-parser. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-09.

Portfolio2.0

Posts with mentions or reviews of Portfolio2.0. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-11-28.
  • Dark Mode Toggle and prefers-color-scheme
    1 project | dev.to | 21 Apr 2023
    You can check out all the code for this app in my portfolio repo.
  • What are Favicons?
    1 project | dev.to | 8 May 2022
    To update my favicon, I need to update two tags in my index.html file. Because of how React works, the two paths in my href="" attributes start with %PUBLIC_URL% before the /, but here's the code with a more universal path:
  • Accessibility Auditing My Portfolio Site - Part 6
    2 projects | dev.to | 28 Nov 2021
    , because I want it to be visually hidden, I'll be fixing that when I get to this Github issue. WAVE mostly returned errors I had already vetted. It did actually catch one of the many broken links that I'll be fixing in this Github issue. It returned 27 long alt-text warnings on my blog page, but they're all less than 150 characters. I also got false positive contrast errors for my visually hidden skip links. ARC is down to primarily false positives. There were a couple I had to look up to make sure they were ok, like buttons with transparent backgrounds and using images with alt-text or an aria-label instead of text in links. The IBM Equal Access Accessibility checker just stopped working. It refused to scan even after I restarted Chrome, uninstalled and reinstalled it in Chrome, and installed it in Firefox. I saw something about the ruleset being undefined, so hopefully they fix that soon. Luckily, I ran it multiple times in Part 5 so I'm comfortable with moving on. The Microsoft Accessibility Insights Fast Pass didn't find anything that wasn't already on my radar, but I will be using the Assessment option as a guide for my manual testing again.
  • Accessibility Auditing My Portfolio Site - Part 4
    1 project | dev.to | 11 Nov 2021
    This blog will focus on making the blog preview component code on the main page of my site more accessible.
  • An Accessible Dark Mode Toggle in React
    1 project | dev.to | 6 Nov 2021
    My portfolio Github repository has all the toggle component code and the toggle CSS. The structure of the toggle looks like this:
  • Accessibility Auditing My Portfolio Site - Part 2
    3 projects | dev.to | 4 Nov 2021
    If I wanted these to be the most accessible, I would also add another visual cue that showed "this link will open in a new tab" on hover or focus. This would be ideal for the links attached to the Github and Chrome SVGs and for keyboard and unassisted users that don't know what the external icon link means. However, I would want to spend time I don't have today designing a nice-looking version of that, so I've added this to my Github repository as my first backlog issue for this site.
  • Adding Shiba Inu Loading and Error SVGs to My React Site
    3 projects | dev.to | 30 Aug 2021
  • A Walkthrough of Updating My Portfolio Site with Netlify Functions and the Dev.to API
    3 projects | dev.to | 31 Jul 2021
    When I found out DEV has an API that will send you the HTML of each of your blogs, I made a branch in my portfolio site repo, rewrote my FullBlog component, and attempted to call the API from within the established Blog React component. No dice. CORS error. Now I knew that I needed a server so I could use a CORS package or another solution. At this point, I also noticed I'd have to call the DEV API /articles/me endpoint to get the ids of each of my blogs and then call the /articles/{id} endpoint with the id to get the HTML version or find a solution for the markdown version.
  • Toggle Dark Mode in React
    1 project | dev.to | 5 Mar 2021
    Next, I added the toggle component to my navigation bar component. I styled the toggle following Chris Bongersā€™ Tutorial based on Katia De Juanā€™s Dribbble. Then I adjusted the size and flipped it to default to dark mode. While this toggle is so cute that you could die, this tutorial will work with any or clickable . First, I set up the basic JSX, the local state, and a variable to hold the theme we get from localStorage: import React, { useEffect, useState } from 'react'; import '../styles/toggle.css'; import { setTheme } from '../utils/themes'; function Toggle() { const [togClass, setTogClass] = useState('dark'); let theme = localStorage.getItem('theme'); return (
    ) } export default Toggle; Enter fullscreen mode Exit fullscreen mode When a user clicks the toggle, I want the theme on the page to change and the toggle to change with it. I added the imported setTheme() function and setTogClass() from the local state to a handleOnClick function. You can see where it is passed to the clickable part of the toggle in the JSX above. const handleOnClick = () => { if (localStorage.getItem('theme') === 'theme-dark') { setTheme('theme-light'); setTogClass('light') } else { setTheme('theme-dark'); setTogClass('dark') } } Enter fullscreen mode Exit fullscreen mode I used this componentā€™s useEffect() to make sure the local state togClass always loads with the correct theme. useEffect(() => { if (localStorage.getItem('theme') === 'theme-dark') { setTogClass('dark') } else if (localStorage.getItem('theme') === 'theme-light') { setTogClass('light') } }, [theme]) Enter fullscreen mode Exit fullscreen mode Because my toggle is a checkbox, the dark theme should show the unchecked (moon) state and the light theme should show the checked (sun) state. I couldnā€™t get defaultChecked to work how I wanted, so I replaced the unchecked with this conditional rendering ternary operator (conditional operator): { togClass === "light" ? : } Enter fullscreen mode Exit fullscreen mode If you used a , you could easily use conditional rendering like this to change the className attribute within the tag and get the same effect. Put all together, the code for the toggle component looks like this: import React, { useEffect, useState } from 'react'; import '../styles/toggle.css'; import { setTheme } from '../utils/themes'; function Toggle() { const [togClass, setTogClass] = useState('dark'); let theme = localStorage.getItem('theme'); const handleOnClick = () => { if (localStorage.getItem('theme') === 'theme-dark') { setTheme('theme-light'); setTogClass('light') } else { setTheme('theme-dark'); setTogClass('dark') } } useEffect(() => { if (localStorage.getItem('theme') === 'theme-dark') { setTogClass('dark') } else if (localStorage.getItem('theme') === 'theme-light') { setTogClass('light') } }, [theme]) return (
    { togClass === "light" ? : }
    ) } Enter fullscreen mode Exit fullscreen mode Finally, my favorite part: the color switching SVGs! CSS variables work in SVG code too! I got my SVG code for the Github and Chrome icons from DEVICON. For the Github icon all I had to change was one fill attribute in a : fill="var(--dark-text)"> Enter fullscreen mode Exit fullscreen mode The Chrome icon had a fill attribute in a and a : fill="var(--dark-text)" cx="63.624" cy="64.474" r="22.634"> fill="var(--dark-text)" ...> Enter fullscreen mode Exit fullscreen mode The result looks like this: Conclusion I tried to include all of the relevant code, but you can also see the full code for my site in its Github repository. If you enjoyed this article or are left with questions, please leave a comment below! I would also love to see anything built following this tutorial.

What are some alternatives?

When comparing html-react-parser and Portfolio2.0 you can also consider the following projects:

imparse - Parser generator that can be used to quickly and succinctly define a parser definition, and to deploy an automatically-generated implementations thereof in multiple languages and on multiple platforms.

svgr - Transform SVGs into React components šŸ¦

remarkable - Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.

wishyouwerehere - Wish You Were Here Weather App

DOMPurify - DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:

BujoToGo

bbob - āš”ļøBlazing fast js bbcode parser, that transforms and parses bbcode to AST with plugin support in pure javascript, no dependencies

tdsr - A console screen reader for macOS and Linux

texthighlighter - a no dependency typescript npm package for highlighting user selected text

Font-Awesome - The iconic SVG, font, and CSS toolkit

react-icons - svg react icons of popular icon packs

heroicons - A set of free MIT-licensed high-quality SVG icons for UI development.