edemaine / meteor-solid-hack

Meteor support for SolidJS (Solid hackathon submission)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Meteor support for SolidJS

This Solid hackathon submission consists of four subprojects (each with their own detailed documentation):

  1. meteor-solid is a Meteor plugin to enable the SolidJS compiler, with support for HMR, SSR (which requires different compiler settings on server and client, something not natively supported by Meteor), and JavaScript, TypeScript, and CoffeeScript languages.

  2. solid-meteor-data is an NPM library containing SolidJS helper functions (create...) for interacting with Meteor data, including integration of Meteor's Tracker reactive engine and fetching data from Meteor's Mongo collections.

    This is probably the most impressive bit of code. It features automatic synchronization of Mongo Collection diffs into a Solid signal storing an array of Solid Stores, with full fine-grained reactivity support. It can also enable fully automatic integration between SolidJS and Meteor Tracker reactivity.

  3. solid-meteor-demo is a simple demo app illustrating use of meteor-solid and solid-meteor-data.

    Try out the demo deployment.

  4. meteor-solid-template-helper enables Meteor projects to transition gradually from the original Blaze rendering engine to SolidJS by allowing Solid components to be embedded within Blaze templates. There are many Meteor projects out there that still use Blaze, so this makes it easy to port to Solid one template at a time. I also wrote a comparison between Blaze and Solid to encourage further adoption.

Use

I use meteor-solid, solid-meteor-data, and solid-meteor-template-helper in production in two major projects:

  • Coauthor (software for mathematical research collaboration and result tracking), which uses Blaze, React, and Solid (!) in different parts of its interface; it's in a constant state of gradual porting to newer stacks. (≈2,000 users.)
  • Cocreate, which I recently ported fully from React to Solid. (≈70,000 rooms; I have no way of counting users.)

Notes on Submission

I created (and continue to maintain) the four subprojects above in their own separate repositories. This repository is a temporary monorepo housing all four subprojects, for easier review and to allow me to continue working on the main branch of the individual repositories without affecting this main branch. All original commits have been preserved via git subtree.

I started this project on December 28, 2021, at the Solid meetup where the Hackathon was first announced. Note that this is a few days before the official January 7, 2022, start date.

About

Meteor support for SolidJS (Solid hackathon submission)

License:MIT License


Languages

Language:JavaScript 64.9%Language:TypeScript 26.6%Language:CoffeeScript 8.1%Language:CSS 0.2%Language:HTML 0.1%