0.5.0 • Published 3 years ago

rayden v0.5.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

ABOUT

Created by Pete Savva @ Tech & Tribal
https://techandtribal.com
For collabs / consulting / coffee:
p.savva@protonmail.ch
Twitter @techandtribal
Discord @techandtribal
  1. Building for my kids, leave the debilitating perfectionism at the door and just build.
  2. You're closer than you think.
  3. Burn the ships.

UPDATES

  • Full documentation coming. Baby scan today and wanted this up to prove a point to myself.
  • Added Rayden Rapid Site Deployment, a tool to knock up Next sites ready to go.
  • Created the useComponent hook to keep a store of components, for granular tracking in console view. Also automatically hooks into the lifecycles and keeps detailed logs in the console of every mount and unmount, renders etc. See example below.
  • Try the Logging tool import { Log } from "ariana/main" - it makes the dev tools much more attractive when debugging.

BASICS

  • Experimental package to enable reuse of components across projects without having to copy and paste.
  • This keeps all of your projects using the same versions.

INSTALLATION

1) Run npm install 2) Run npm run build as per package.json to generate a main.js file in the project directory.

EXAMPLE USAGE

import { Log, SASS, useComponent } from "aristotle"
import styled from "styled-components";

const Layout = styled.div`
	${ SASS.Size.Full } // equivalent to height: 100%; width: 100%;
`;

export const ComponentX = (props) => {
	// Log.Render and Log.Mounted and Log.Unmounted are called automatically so check Dev Tools to see the output
	useComponent("ComponentX", () => {
		Log.Message("This (optional) function will run on mount");
	},
	() => {
		Log.Message("This will run on unmount");
	});

	return(
		<Layout>
			{ "Welcome to useComponent" }
		</Layout>
	);
};