Coder Social home page Coder Social logo

marceloadsj / react-indicative-hooks Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 598 KB

✈️ A wrapper between React Hooks and Indicative library

Home Page: https://www.npmjs.com/package/react-indicative-hooks

License: MIT License

HTML 1.85% JavaScript 97.97% CSS 0.18%

react-indicative-hooks's People

Contributors

davityavryan avatar dependabot[bot] avatar marceloadsj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ernestchakhoyan

react-indicative-hooks's Issues

Development improvements discussion

Hey @marceloadsj,

I am about to push PR but wanted to address here several things so that we will agree with changes that I will do, it's your package anyway.

  1. Upgrade all dev packages. For now I will do only dev packages so that there will be no breaking change. I have upgraded everything but indicative (which is w major versions behind) and nothing major has been changed in dist folder. To be clear, this will require to bump node restriction on engines section of package.json to at least version 10, but I will even recommend to bump it to current LTS 12.14.1.
  2. Re-define eslint rules and fix whole code to comply to that rules. I have noticed that you have a lot of rules enforced but code has a lot of eslint errors at the same time. If you agree with changing some rules then I will fix whole code.
  3. Remove react-scripts and use webpack right away. react-scripts has a lot of dependencies which are even pinned and so this adds a lot of duplicates. I can implement webpack version and add jest as you are using it. Basically this will lower number of dependencies (and less dependencies are always good, because vulnerabilities, upgrades, ...), and seems like you are using only that two features of react-scripts.
  4. Move some of dev dependencies to example folder or even merge them into one package.json to not maintain two separate folders.
  5. Add some badges to Readme. Just for fun :)

If you don't agree or need more details please refer to points with numbers.

Messages are not updated

Hey @marceloadsj,

This line has a problem. Basically if you pass messages to useValidateAll then they are static and are not changing. This is a big problem if you use translations and messages have changed on the fly (without refresh of a page).

Would be nice to have them as a dependency (maybe even rules should be a dependency, I don't know.).

If you are ok the I will open a PR with changes.

p.s. same for useValidate.

error after upgrading to 1.2.0 with react native

Hi,

I have this error after upgrading to 1.2.0

error: bundling failed: Error: While trying to resolve module `react-indicative-hooks` from file `/Users/admin/Documents/git/sparvest-mobile/sparvest/app/scenes/SignIn/index.js`, the package `/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/react-indicative-hooks/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/react-indicative-hooks/dist/index.umd.js`. Indeed, none of these files exist:
  * `/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/react-indicative-hooks/dist/index.umd.js(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
  * `/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/react-indicative-hooks/dist/index.umd.js/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
    at ResolutionRequest.resolveDependency (/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:65:15)
    at DependencyGraph.resolveDependency (/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/metro/src/node-haste/DependencyGraph.js:283:16)
    at Object.resolve (/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/metro/src/lib/transformHelpers.js:261:42)
    at dependencies.map.result (/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/metro/src/DeltaBundler/traverseDependencies.js:399:31)
    at Array.map (<anonymous>)
    at resolveDependencies (/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/metro/src/DeltaBundler/traverseDependencies.js:396:18)
    at /Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/metro/src/DeltaBundler/traverseDependencies.js:269:33
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24)
    at _next (/Users/admin/Documents/git/sparvest-mobile/sparvest/node_modules/metro/src/DeltaBundler/traverseDependencies.js:107:9)

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.