Your Choice JavaScript News

TypeScript News Saturday, March 31 Code, Real time, Typescript & more…

TypeScript News TLDR / Table of Contents

  • Introducing Your Live React Component Playground –
    • How Bit’s live UI component interactive playground for React and Vue help you discover and choose the best components to use in you project using component compiling, bundling, rendering and more.
    • code, real time, pre-compiled standard code, regular Bit component, usage example
  • Announcing TypeScript 2.8
    • TypeScript, excellent TypeScript support, conditional types, TypeScript compiler, Wenlu Wang TypeScript
  • Custom Preloading and Lazy Loading Strategies with Angular
    • Learn how to set up custom preloading and lazy loading strategies in Angular
    • preload strategy, Angular, lazy loading, angular router, quick Angular apps
  • This is why I built an interactive playground where all the components you share with Bit are up and running in real time and can be played with on the web.
  • Bits rebundler workflowRebundling takes the already compiled code, and compiles it again into a single file, this time with all its dependencies.
  • Step 3:rendererIn this step, the code is matched with its appropriate Renderer, and a usage example, provided by the owner of the component.
  • The renderer is a regular Bit component on its own, meaning that we could easily replace it following the Open Closed Principle.
  • Do ityourselfReact card component from Bits communityTo share your own components with a live preview and start playing with them online all you have to do is follow this simple tutorial.

Tags: code, real time, pre-compiled standard code, regular Bit component, usage example

  • Conditional types are a new construct in TypeScript that allow us to choose types based on other types.
  • Just like how JavaScript can make decisions at runtime based on the characteristics of a value, conditional types let TypeScript make decisions in the type system based on the characteristics of other types.
  • selects types from its first argument that are assignable to its second argument: – – does the opposite; it removes types from its first argument that are not assignable to its second: – – Thanks to a pull request from Manoj Patel, TypeScript now features an flag which can be…
  • TypeScript 2.8 will rewrite it to the following when compiling to CommonJS and ES5: – – Currently, when TypeScript uses JSX, it looks up a global namespace to look up certain types (e.g. whats the type of a JSX component?)
  • Similarly, TypeScript now provides a new type in that removes optionality from each property: – – The operator can be handy when you want to call out that a mapped type is adding modifiers.

Tags: TypeScript, excellent TypeScript support, conditional types, TypeScript compiler, Wenlu Wang TypeScript

  • One of the critical features that enable responsive, quick Angular apps is the ability to lazy load code with the Angular Router.
  • The Angular router has the fantastic ability to load code on demand as the user routes between views on our apps.
  • By splitting our features into stand alone Angular Modules we can lazy load the module when the user clicks the link to navigate to this feature.
  • The preload strategy build into Angular looks something like the following in our app routing module: – – This pattern is great for performance and lazy loading progressively, but we can do better.
  • With the Angular router and custom preload strategies, we can customize how we load our code to optimize best our applications use cases.

Tags: preload strategy, Angular, lazy loading, angular router, quick Angular apps

Comments are closed, but trackbacks and pingbacks are open.