devsamples Profile Banner
devsamples Profile
devsamples

@devsamples

Followers
277
Following
319
Media
184
Statuses
443

Providing the world with common and easy to use code samples to make your coding journeys easier. #100DaysOfCode #javascript #reactjs

United States
Joined April 2019
Don't wanna be here? Send us removal request.
@devsamples
devsamples
6 years
What are some of the common code snippets you have to look up every time you work on a project? Sticky footers? React lifecycle methods? Something more complex? #webdevelopment #100DaysOfCode #CodeNewbie #javascript #css #javascript #webdev #HTML #reactjs #git #learntocode
3
6
6
@devsamples
devsamples
4 years
SvelteJS makes it easy to do things that would normally require a lot of code/complexity. Here's a way to create a parallax scrolling effect with just a few lines of code. #javascript #sveltejs #100daysofcodechallenge #CodeNewbie #webdev #code https://t.co/JHln8Z6Fjt
0
0
1
@devsamples
devsamples
4 years
The :empty pseudo selector is a great way to target elements without any content. Here's one way to use it. #CSS #100DaysOfCode #CodeNewbie #code #Webdesign #Website https://t.co/Pa2kiGD3bK
0
10
2
@devsamples
devsamples
4 years
SvelteJS provides some very useful lifecycle functions similar to React's componentWillUpdate/componentDidUpdate. Here's how to use them. #javascript #sveltejs #100DaysOfCode #CodeNewbie #React #code https://t.co/VaoUMWfO9Z
1
17
12
@devsamples
devsamples
5 years
Typescript can cause some confusion when trying to define types for data that you don't know the exact shape of. Here's one method for typing an object with unknown properties. #typescript #javascript #100DaysOfCode #code #CodeNewbie https://t.co/QXihJARHbC
0
0
2
@devsamples
devsamples
5 years
Although React Native warnings should not always be ignored, there are times when you may want to silence them during development. Here's one method: #ReactNative #javascript #reactjs #100DaysOfCode #CodeNewbie #code https://t.co/nEQD4A0RTR
0
8
0
@devsamples
devsamples
5 years
Debounce functions are a great way to prevent performance issues and unnecessary updates for events like input change, resize, scrolling, etc. Here's one example: #javascript #CodeNewbie #100daysofcodechallenge #webdeveloper #100daysofcode #code https://t.co/HTaRIFmtiq
1
11
5
@devsamples
devsamples
5 years
Did you know that you can perform client-side redirects without #javascript? Here's how. https://t.co/7ubmtFBAHX
0
0
2
@devsamples
devsamples
5 years
Javascript comes with some great currency formatting options, no need to use a third-party library in most cases. Here's one example: #javascript #100DaysOfCode #CodeNewbie #Currency #CodeNewbies https://t.co/pXYGixV4i7
0
4
3
@devsamples
devsamples
5 years
The getEventListeners() function is an amazing tool that will show you the active event listeners bound to a given DOM node. Here's how to use it. #javascript #100DaysOfCode #CodeNewbie #webdev #javascript30 #CodeNewbies #Website #Chrome #code https://t.co/CDdvcZ2obt
0
7
6
@devsamples
devsamples
5 years
Combining the 'selected', 'disabled', and 'hidden' attributes is a great way to give HTML dropdowns a default value. Mix and match them to meet your use case. #HTML #webdeveloper #100DaysOfCode #CodeNewbie #javascript #frontenddev #webdev https://t.co/iqGJ4WU1Ib
0
16
1
@devsamples
devsamples
5 years
There are a bunch of different ways to copy a string to the clipboard in Javascript. Here's one method with great browser support. #javascript #100DaysOfCode #webdevelopment #CodeNewbie https://t.co/ccaHp489ma
0
8
3
@devsamples
devsamples
5 years
Did you know that you can refresh a page without using javascript? Here's an example that effectively adds client-side polling to a webpage with just HTML. #HTML #javascript #HTML5 #javascript30 #100DaysOfCode #CodeNewbie #webdevelopment #HTML名刺 https://t.co/7ubmtFBAHX
0
13
9
@addyosmani
Addy Osmani
5 years
The <img> element now supports lazy-loading, async decoding and many other features: https://t.co/QcbvWLQfT7 I wrote about how to optimize UX & the Core Web Vitals with it.
41
1K
4K
@devsamples
devsamples
5 years
Ever wanted to "go back in time" with Git? You can! Use the reflog command to view the history of changes and reset to a specific commit. #git #github #100DaysOfCode #javascript #CSS #CodeNewbie #code #webdeveloper #webdev #Website https://t.co/yAyIWP6DUf
0
6
2
@devsamples
devsamples
5 years
Docker is everywhere these days, but sometimes it can be difficult to find and remove any containers that you have running. Here's a sample to help you stop or remove these containers. #docker #CodeNewbie #webdevelopment #100DaysOfCode https://t.co/SE7X0shtYy
0
2
2
@devsamples
devsamples
5 years
Browsers often have a hard time figuring out how to break up long words. Use the word-wrap and word-break properties to specify how a browser should handle text content that doesn't fit. #CSS #100DaysOfCode #webdevelopment #CodeNewbie #javascript #code https://t.co/jGmpvL9JqT
0
2
1
@devsamples
devsamples
5 years
There are a number of different ways to empty an array with Javascript. Here are 3. Can you think of any others? #javascript #100DaysOfCode #CodeNewbies #javascript30 #code https://t.co/wcUCADMSzn
0
6
2
@devsamples
devsamples
5 years
If you use React Navigation, you may have wanted to send data back to a component when using the goBack() method. This is not supported, but here's a workaround. #ReactNative #reactjs #100DaysOfCode #CodeNewbie #ios #Android #code https://t.co/ndkJw3sA7j
2
3
5
@mikaelainalem
Mikael Ainalem
5 years
Using clip-path transitions to create a hamburger menu open effect. On @CodePen https://t.co/GOEtxqRc8h
4
19
151
@devsamples
devsamples
5 years
Removing all files of a given type or extension is a breeze with the command line. Here's one way you can do it on UNIX or Windows machines. #UNIX #Windows #100DaysOfCode #Linux #CodeNewbie #code https://t.co/lH89flNcfT
0
2
4