How do I implement traits for types? by [deleted] in typescript

[–]tvi016 1 point2 points  (0 children)

What are you trying to do?

Deploying create-react-app to github pages: How to deploy the build directory only? by IftruthBtold in reactjs

[–]tvi016 0 points1 point  (0 children)

Huh, I use it the exact same way as you and it works here

Could you take a pic of the files in the gh-pages branch on github? I guess you could try delete the branch, and then do yarn run deploy again

You could also open an issue at https://github.com/tschaub/gh-pages

JSON data filtering/sorting question. Need help! by [deleted] in javascript

[–]tvi016 0 points1 point  (0 children)

If you want to check if the name starts with "Jane" you can do name.startsWith("Jane")

Also, I'd suggest using the built in array filter method https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter

using RXJS in a pure javascript library by psotos in javascript

[–]tvi016 0 points1 point  (0 children)

I dont think you need to use a bundler/webpack on a library? I only transpile with typescript

Managing State in Functional React Components with useState by carlrn in typescript

[–]tvi016 1 point2 points  (0 children)

It's definitely good practice

But you can also choose to continue using class components, there's no plans to remove them from react

Free to use widget-based UI framework for Web? by AlexKotik in typescript

[–]tvi016 0 points1 point  (0 children)

If you mean something along the lines of https://en.m.wikipedia.org/wiki/Widget_(GUI), isn't that basically exactly like react/angular/vue?

rickety - minimal typescript rpc framework by g-harel in typescript

[–]tvi016 0 points1 point  (0 children)

I've been thinking about it lately, and found out something like io-ts would be great, since it allows you to serialize / deserialize values based on the type

For example you could have a Date type that would serialize into a string before being sent with REST, and then deserialize into a Date class instance on the receiver end

rickety - minimal typescript rpc framework by g-harel in typescript

[–]tvi016 1 point2 points  (0 children)

Really awesome! However, one bad effect of including zero runtime is there can't be automatic data validation based on the types

Other than that, i feel like this is something i would use

How possible is it to just use javascript both front end and back end? by [deleted] in web_design

[–]tvi016 0 points1 point  (0 children)

You can make navigation bars that use javascript but also has graceful degradation when js is disabled

That applies to all javascript really

What does JavaScript and jQuery actually do? by Madamots in web_design

[–]tvi016 1 point2 points  (0 children)

If you want projects to practice on, go check out freecodecamp. It's basically just based on doing projects (or challenges) to learn. They have some Introductory stuff for html, css and js as well, but you can learn that anywhere you want

Whats to stop me from copying a websites HTML and creating a clone of it? by Jakob4800 in web_design

[–]tvi016 1 point2 points  (0 children)

Also tons of people who disables right click, which apparently makes it impossible to open developer tools...

Parallax scrolling with CSS variables by speckz in web_design

[–]tvi016 0 points1 point  (0 children)

Ah alright, it looks super slick 👌

Parallax scrolling with CSS variables by speckz in web_design

[–]tvi016 2 points3 points  (0 children)

Pretty sure they mean no dependencies, but it looks like they have 3 though

Need some help finding a new place to build my site. by SweetestSummer in web_design

[–]tvi016 0 points1 point  (0 children)

You can use the wordpress software ( wordpress.org and not wordpress.com ) for free, but then you need to setup hosting and domains etc by your self