atomicojs / hooks Goto Github PK
View Code? Open in Web Editor NEWutility kit for use with Atomico
Home Page: https://atomico.gitbook.io/doc/atomico/atomico-hooks
License: MIT License
utility kit for use with Atomico
Home Page: https://atomico.gitbook.io/doc/atomico/atomico-hooks
License: MIT License
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.
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
it seams that useStyleSheet can't be found in kit
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>
);
},
},
];
To find also text-only Nodes which are passed in <slot />
, the useSlot
hook should use assignedNodes()
. Otherwise we only get passed HTML elements.
So it would be similar to the React children
prop.
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:
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.