GithubHelp home page GithubHelp logo

ziongh / reatom-react-ts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from artalar/reatom-react-ts

0.0 0.0 0.0 177 KB

Tiny starter pack for @reatom/npm-react

Home Page: https://reatom.dev/

JavaScript 6.60% TypeScript 77.18% CSS 5.79% Nix 2.57% HTML 7.87%

reatom-react-ts's Introduction

This is a template project with boilerplate code for starting your SPA with Reatom.

Tech stack: Vite, TypeScript, React, Reatom.

Try it online: codesandbox, stackblitz, gitpod

Code organization

This is a basic recommendation which you could follow or not.

  • one feature - one model.ts file with all logic.
  • export public atoms and actions, stay internal units in a scope.
  • describe your atoms as your types, simple and clean. It is good to separate atom with object with a few properties to a few atoms using atomization.
  • describe your actions, which handle main domain complexity. Separate complex task to several actions for a better debugging.
  • use hooks to simplify your public interfaces and reduce coupling - instead of export init-like action, start your model on main atom connection.
  • if you need to make your model reusable, just wrap all logic in a factory function and export it. Name it reatomMyFeature (reatom is a verb).

reatom-react-ts's People

Contributors

artalar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.