This starter kit features SolidJS combined with Tailwind CSS.
Managing the state between components is a big part of creating modern web applications. Typically, this is done by using a third-party package. Sometimes it can be combined with fetching server data (e.g., Apollo or Tanstack Query).
- Tanstack Query - Used in other starter kits and offers a lean setup combining state and server communication
- createResource - Built-in SolidJS and offers a similar experience to Tanstack Query
Use SolidJS' native createResource
as it comes with bundles and is the "solid way" of handling things.
A small counter example that showcases how to use state in SolidJS. You can view the example on the src/pages/Counter
.
Signals can live outside of components. Each relevant component subscribes to its value by using it.
Demonstrates how to retrieve data from a third-party API by using createResource
.
This README is written with pnpm in mind but you can use other manager runner
npm i -g pnpm
pnpm dlx create-starter-dev
- Follow the prompts to select the starter kit and name your new project.
cd
into your project directory and runpnpm install
.- Run
pnpm run dev
to start the development server. - Open your browser to
http://localhost:3000
to see the included example code running.
git clone https://github.com/thisdot/starter.dev.git
- Copy and rename the
starters/solidjs-tailwind
directory to the name of your new project. cd
into your project directory and runpnpm install
.- Run
pnpm run dev
to start the development server. - Open your browser to
http://localhost:3000
to see the included example code running.
dev
- Runs the development server on localhost port 3000 with HMRtest
- Runs the test suitestorybook
- To showcase the component librarybuild
- Builds a production version of the app to deployserve
- Serves a production build on localhost port 4173lint
- Uses eslint to find potential issues in the codebaselint-fix
- Tries to auto-fix potential issuesformat
- Fixes formatting issues in the codebase
The demo application re-implements some of GitHub's pages and functionality. It uses the OAuth credentials in GitHub to authenticate users with their GitHub accounts and uses RxJS to fetch data from the GitHub API. Check out the link above to learn more or check out the demo!
This demo app gets deployed to Netlify on changes to the main
branch.