{"id":26072032,"url":"https://github.com/ld0rman/preact-classless-component","last_synced_at":"2026-01-12T06:39:28.731Z","repository":{"id":8207585,"uuid":"57251253","full_name":"laurencedorman/preact-classless-component","owner":"laurencedorman","description":"A utility method to create preact components without using class keyword","archived":true,"fork":false,"pushed_at":"2022-02-11T20:37:12.000Z","size":952,"stargazers_count":44,"open_issues_count":12,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-12T22:29:15.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laurencedorman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-27T21:50:11.000Z","updated_at":"2024-06-12T22:29:15.385Z","dependencies_parsed_at":"2022-08-06T22:00:52.561Z","dependency_job_id":null,"html_url":"https://github.com/laurencedorman/preact-classless-component","commit_stats":null,"previous_names":["ld0rman/preact-classless-component"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurencedorman%2Fpreact-classless-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurencedorman%2Fpreact-classless-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurencedorman%2Fpreact-classless-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurencedorman%2Fpreact-classless-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laurencedorman","download_url":"https://codeload.github.com/laurencedorman/preact-classless-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242623571,"owners_count":20159706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-09T00:01:40.922Z","updated_at":"2025-03-09T00:05:14.629Z","avatar_url":"https://github.com/laurencedorman.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\n# Preact Classless Component\n[![npm](https://img.shields.io/npm/v/preact-classless-component.svg)](http://npm.im/preact-classless-component)\n[![travis](https://travis-ci.org/laurencedorman/preact-classless-component.svg?branch=master)](https://travis-ci.org/laurencedorman/preact-classless-component)\n[![Dependency Status](https://david-dm.org/laurencedorman/preact-classless-component.svg?style=flat)](https://david-dm.org/laurencedorman/preact-classless-component)\n[![devDependency Status](https://david-dm.org/laurencedorman/preact-classless-component/dev-status.svg?style=flat)](https://david-dm.org/laurencedorman/preact-classless-component#info=devDependencies)\n\nIf you use the [Preact](https://github.com/developit/preact) library, but don't want to use the `class` syntax because you've read articles by [Eric Elliott](https://medium.com/javascript-scene/a-simple-challenge-to-classical-inheritance-fans-e78c2cf5eead#.a3ako7xx9) and others that have lead you to favour object composition over class inheritance, then this utility is for you.\n\n### Installation\n\n```\n$ npm install --save preact-classless-component\n```\n\n### Usage\n\n```js\n/* ES6 Modules */\n\nimport createComponent from 'preact-classless-component';\n\n/* CommonJS */\n\nconst createComponent = require('preact-classless-component');\n\nconst Component = createComponent({\n\trender(props, state) {\n\t\treturn (\n\t\t\t\u003cdiv\u003e\n\t\t\t\tHello world!\n\t\t\t\u003c/div\u003e\n\t\t);\n\t}\n});\n\n```\n\n### Acknowledgments\n\nThanks to [Jason Miller](https://github.com/developit) for his help on debugging this function.\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fld0rman%2Fpreact-classless-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fld0rman%2Fpreact-classless-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fld0rman%2Fpreact-classless-component/lists"}