Coder Social home page Coder Social logo

lodestar-app-element's Introduction

Lodestar App Element

Craft.js

every changes will break the application we have to do our best not to revise the interface

Element Component

each component should be ElementComponent so that it can be converted to Craft Element. To convert to Craft element, simply use:

Craftize(ElementComponent)

for an element component, you will get the following props:

  1. className: after crafting, you will get the styled className
  2. loading: you will get partial props for loading
  3. errors: you will get partial props for errors
  4. editing: craft editor state
  5. other props you set

Why do we keep loading/errors/data at once?

when the state changed into loading, the data/error state should still exist. also, when the state changed into error, the original UI should be kept.

Context Collection

Why do we use context?

  1. Custom hook: not suitable for development
  2. useState: not suitable for graphql
  3. Conditional render: not suitable for flexible UI component we focus on data processing instead of passing through annoying arguments

lodestar-app-element's People

Contributors

clothe09986 avatar elantris avatar emily40830 avatar futianshen avatar hltvproxy avatar jackey8616 avatar jhihruei avatar kkshyu avatar ponchimeow avatar qraft-service avatar sunnylochun avatar torai55 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.