daybrush / css-styled Goto Github PK
View Code? Open in Web Editor NEW⚖️ This component is a lightweight, simple line style component.
License: MIT License
⚖️ This component is a lightweight, simple line style component.
License: MIT License
The following commit cause an issue in project using this library:
ac6a2b3
Line that causes the issue:
ac6a2b3#diff-0e825ed2f2470d57c43b731b2eea9bbf05aef8e9d1e091b017b56ecd094609eaR22
My situation: I am using the library moveable in a non-react app.
Since there is no react version, its value is undefined
so it crashes when doing .indexOf
(cannot read indexOf of undefined)
@daybrush Could you check if the version exists before doing the indexOf ? Like:
if ((version ?? '').indexOf("simple") > -1 && portalContainer) {
Thank you
I've found that this library generates an error when used with React's strict mode. It looks like it would be straightforward to fix - this code just needs to be switched to using refs instead of using findDOMNode.
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Styler which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node
in div (created by Styler)
in Styler (created by MoveableManager)
in MoveableManager (created by Moveable)
in Moveable
you wanted a bug report, here it comes ;-)
The link to the API docs from ReadMe.md points to "https://daybrush.com/css-styled/release/latest/doc/" which does not exist.
the creact-css-styled
packages imports the croact
package but the package.json
does not have croact
in dependencies
, only in devDependencies
. this causes problems.
how to reproduce the problem:
npm init
npm add croact-css-styled
node
, and inside run require('croact-css-styled')
Uncaught Error: Cannot find module 'croact'
Require stack:
- .../node_modules/croact-css-styled/dist/styled.cjs.js
(in this case you can workaround it by just installing croact
, but if you use yarn
for example, which only allows loading code from packages that your package depends on, it becomes a harder problem)
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.