Migrating from SolidJS to Solid-Start

Posted at Mon, 10 Apr 2023 by Marco Antonio

And here we are again

I recently migrated my web application from SolidJS to Solid-Start, a starterkit for building SolidJS applications. Here's a rundown of the changes I made:

  • Update dependencies: I updated my project dependencies to match those ofSolid-Start, which included newer versions of SolidJS and other packages.

  • Setup Solid-Start: I followed the Solid-Start documentation to set up myapplication with its recommended folder structure and build tools.

  • Reuse components: I reused components such as the Home and NotFound pages,which required some minor adjustments to match the Solid-Start structure.

  • Share components: I refactored my code to share components between pageswhere possible. For example, I moved the meta data to the root.tsx layout toavoid duplication.

  • Add 404 page: I added a 404 page to handle non-existent routes.

  • Local plugins: I set up local plugins for Solid-Start to extend itsfunctionality.

  • Separate PR workflow: I added a separate workflow for pull requests toensure that tests were run before merging.

  • Rename PR job: I renamed the job for pull request workflows to betterreflect its purpose.

  • Run on pull request created: I configured my GitHub Action to run on pullrequests created, in addition to pushes.

  • Migrate to Solid-Start: I replaced my SolidJS implementation with theequivalent Solid-Start implementation, making any necessary changes to fit thenew structure.

Overall, the migration to Solid-Start was a smooth process, and I'm pleased withthe result. If you're looking to build a SolidJS application, I'd definitelyrecommend checking it out!

You can check the Pull Requesthere.

Reference