Code Monkey home page Code Monkey logo

moontest's Introduction

Task-Fragmentation

AN assignment to test the fragmentation ability of Developers

My Pick - Fragmentation of UI

I completed this in one and half hour then started writing readme

My Reasons for Fragmentating it like that

  • It has a mix of states and hooks(functions) which are related to different elements. so, I thought to fragment it based on these functions.

  • I divided it into 5 components and one main(root) page based on states related to the component.

  • firstly, I went into the tsx and analysed it based on elements which are using variables(props) and started to seperate them based on that, and after that went to state hooks and attached them to the components which are useless without them and also reduced the chance of rendering at the main component

  • then, analysed useEffect hooks and based on the variables it using i put them in the appropriate components where these variables which are used by useEffect are available

  • after that functions like "refetchTransactions" it's using setBurnTransactions so i put it in BurnStatsContainer component

  • by fragmenting based on states it reduces the re rendering at the root and imroves performance

  • I think i have made the fragmentation accordingly even though the Burnstatscontainer is looking longer but it has just tsx so i thought to not fragment it further

moontest's People

Contributors

shivuduu19 avatar

Watchers

 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.