19 karma · joined Nov 30, 2021 (5y ago) · 2 submissions
comment 4y ago · link · parent
Porting most React code to Solid is pretty easy - mostly involves deleting things that are no longer required (useCallback, useRef, etc) and moving prop access into the JSX to enable just those specific attributes to be updated when state changes.
It has come to the point where I really begrudge going back to working in our React code. Unfortunately those apps will still be around for a long time - but we won't be using React for green-fields projects.
comment 5y ago · link · parent
Having components only run once really simplifies things ...no need to stash useRefs and useCallbacks everywhere. Refs are simply the elements themselves.
Mostly porting required a fairly repeatable pattern of removing awkward React code and using a couple of Solid functions to keep props reactive when splitting them up to spread across JSX elements.
A+ for Solid developer experience (coming from 5+ years working with React). Oh, and performance/size are added benefits.