use-media

useMedia React sensor hook that tracks state of a CSS media query. Depending on your testing setup, you may need to mock window.matchMedia on components that utilize the useMedia hook. import useMedia from ‘use-media’;// Alternatively, you can import as:// import {useMedia} from ‘use-media’;const Demo = () => { // Accepts an object of features to test const isWide = useMedia({minWidth: …

REBASS

REACT PRIMITIVE UI COMPONENTSBUILT WITH STYLED SYSTEM Getting Started Install the core Rebass library. npm i rebass ThemeProvider By default, Rebass components are stylistically unopinionated and do not include a theme. You can add a theme to your application with a ThemeProvider component and by providing a theme in context. For this guide, use the Emotion ThemeProvider with the …

Metadata for SPAs

Have you ever consider Metadata in SPAs? Without metadata, we weaken our ability to demonstrate relevance to search engines. That, in turn, lowers our rankings and reduces the number of consumers to our sites(ecommerce, social). Metadata is a series of micro-communications between site and search engines. Nearly all metadata is invisible to visitors. It lives …

WebRTC Implementation with React and React Native by using OpenTok

Add opentok-react as a dependency of your application: yarn add opentok-react Or if you’re still using npm: npm install –save opentok-react Then include opentok.js before your application: <script src=”https://static.opentok.com/v2/js/opentok.min.js”></script> Alternatively, wrap your top-level component using OpenTok with the preloadScript HOC. The HOC will take care of loading opentok.js for you before rendering. https://github.com/opentok/opentok-reacthttps://github.com/opentok/opentok-react-native-samples