GithubHelp home page GithubHelp logo

atomicojs / hooks Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 5.0 1.6 MB

utility kit for use with Atomico

Home Page: https://atomico.gitbook.io/doc/atomico/atomico-hooks

License: MIT License

JavaScript 91.93% TypeScript 8.07%

hooks's People

Contributors

bennypowers avatar matiasworker avatar saul-mirone avatar uppercod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hooks's Issues

Remove "workspaces" from package.json

We're getting warning from Yarn since a long long time about this. I think the "workspaces" field is not needed anyway in this project, because you only have one package and one package.json.

Yarn output:

warning Workspaces can only be enabled in private projects.

Import issues within Storybook and others

I have issues when importing Atomico hooks, when using Webpack โ€“ i.e. within Storybook

Field 'browser' doesn't contain a valid alias configuration
      using description file: /Users/eike.foken/Code/ds/node_modules/@atomico/hooks/package.json (relative path: ./use-slot)
        no extension
          Field 'browser' doesn't contain a valid alias configuration
          /Users/eike.foken/Code/ds/node_modules/@atomico/hooks/use-slot doesn't exist
        .web.js
          Field 'browser' doesn't contain a valid alias configuration
      using description file: /Users/eike.foken/Code/ds/packages/html/package.json (relative path: ./node_modules/@atomico/hooks/use-slot)
        no extension
          Field 'browser' doesn't contain a valid alias configuration
          /Users/eike.foken/Code/ds/node_modules/@atomico/hooks/use-slot.js doesn't exist

I think this is somehow related: webpack/webpack#4674

file input element inside a-router not working

const result1 = demoResult((props) => <div><input type="file" name='ddd'/>InSide</div>);

const result2 = demoResult((props) => <h3>Config</h3>);

const result3 = demoResult((props) => <h3>{JSON.stringify(props)}</h3>);

export default [
  {
    label: "Ejemplo",
    render() {
      return (
        <host>
          <a-router-proxy>
            <p>
              The import effect is emulated with a delay to show the use of the
              loading slot
            </p>
            <nav>
              <a style="margin:5px" href="/">
                home
              </a>
              <a style="margin:5px" href="/user">
                user
              </a>
              <a style="margin:5px" href="/config">
                config
              </a>
            </nav>
            <a-router-switch>
              <a-router-case path="/" src={result1}></a-router-case>
              <a-router-case path="/user" src={result2}></a-router-case>
              <a-router-case path="/:any..." src={result3}></a-router-case>
              <h1 slot="loading">loading...</h1>
              <h1 slot="404">404</h1>
            </a-router-switch>
          </a-router-proxy>
          <div><input type="file" name='outsize'/>Outsize</div>
        </host>
      );
    },
  },
];

ranglang@02cc9c0

7rhar-416wh

Type error with `useFormListener` hook

I am trying to update the hooks package from 3.43.1 to 3.46.0 but I'm always getting this type error, that useFormListener is missing:

import { useFormListener } from '@atomico/hooks/use-form';

Module '"@atomico/hooks/use-form"' has no exported member 'useFormListener'.

I don't know if there is a problem with other hooks, as we don't use so many hooks from the package. But when I look into the types in VSCode I see:

Screenshot 2022-09-01 at 12 39 26

This is wierd, the file only contains exports and there is no src folder. Other hooks mostly contain one file with the types in it.

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.