Coder Social home page Coder Social logo

context-hook's People

Contributors

loia5tqd001 avatar

Watchers

 avatar  avatar

context-hook's Issues

TODO:

  • Provide an example for hooks with parameters
  • Provide an example for hooks with scope-level Provider (can be the same one as the item above)
  • Improve displayName for better working with React devtool
  • Write error handling/ handling for edge cases (Find TODO: comments in source code)
  • Write a comprehensive README
  • Remove unnecessary code from constate
  • Write examples on codesandbox
  • Write a more complex example with async, Form, Table
  • Write examples on an examples folders with live deployed by vercel
  • Make the examples more visually understandable (e.g: with border around each component)
  • Pitch on Reddit, Hackernews, Twitter,...
  • Write test
  • 2 types of example: Code splitting and mornal

idea

store = createStore(), current
Somehow detect which one runs first
Force to run toContextHook first
[use, Provider] export internal and let the user choose themselves

Kill Redux steps:

  • Clone with-redux-app
  • Add .prettierrc
  • Separate into multiple components
  • Before refactoring: Run test: Test passed 100%
  • Convert code to toContextHook
  • Run test: Test failed
  • Wrap ContextHookProvider around test
  • Run test: Test passed 100%
  • How about dividing the AddAmount component into smaller components? -> With Redux it's fucked, but with toContextHook I'll simply extract the state into a separate hook
  • Run test: Test passed 100%
  • Congratulations
  • Hold on, let me write performance test to see if Redux can be better -> Conclusion

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.