abodehq / azir Goto Github PK
View Code? Open in Web Editor NEWazir ui kit
License: MIT License
azir ui kit
License: MIT License
There is a bug resulting from the following code:
https://github.com/abodehq/azir/blob/master/azir-core/azir-slider/index.tsx
In the UseEffect you don't put the functions as a dependencies. As a result, the functions are not updating, although props such as disabled does update. For example, if you will create a disabled slider, you can't enable it.
You need to use useCallback and to add methods to the dependency list of the useEffects
When using the example for the azir-slider:
import Slider from "azir-slider";
---
<Slider
value={30}
step={10}
minimumValue={0}
maximumValue={100}
onStart={value => console.log(value)}
onChange={value => console.log(value)}
onComplete={value => console.log(value)}
trackColor="red"
thumbColor="blue"
progressTrackColor="green"
thumbSize={50}
trackSize={30}
/>
it works like in the example.
when changing the value field to this.state.position
the slider is stuck at the first value given.
logging the this.state.position
in the render function shows it gets updated.
When screen starts, slider "jumps" to value instead of rendering on selected value.
GIF here:
https://user-images.githubusercontent.com/12761818/70825181-1f1d8a00-1de4-11ea-9eab-0963f61a6111.gif
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.