New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@laboratoria/react

Package Overview
Dependencies
Maintainers
2
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@laboratoria/react

Este repo contiene componentes, hooks y otras cositas que queremos reusar entre varias interfaces de Laboratoria. Este módulo depende de [`@laboratoria/sdk-js`](https://www.npmjs.com/package/@laboratoria/sdk-js) y contiene un _hook_ (`useApp`) que nos da

  • 1.3.0
  • npm
  • Socket score

Version published
Weekly downloads
23
decreased by-8%
Maintainers
2
Weekly downloads
 
Created
Source

@laboratoria/react

Este repo contiene componentes, hooks y otras cositas que queremos reusar entre varias interfaces de Laboratoria. Este módulo depende de @laboratoria/sdk-js y contiene un hook (useApp) que nos da acceso al objeto app del SDK. Con lo cual, si estás usando este módulo desde una app en React, no necesitas instalar directamente @laboratoria/sdk-js.

Se asume que las interfaces en cuestión todas usan React, React router DOM y MUI.

{
  "peerDependencies": {
    "@mui/material": "^5.3.1",
    "@mui/styles": "^5.3.0",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-router-dom": "^6.0.2"
  }
}

Hooks

  • useApp

El hook useApp nos da una referencia al objeto app de @laboratoria/sdk-js, el cual se puede configurar con las siguientes variables de entorno:

  • REACT_APP_FIREBASE_API_KEY
  • REACT_APP_FIREBASE_PROJECT
  • REACT_APP_LABORATORIA_CORE_API_URL
  • REACT_APP_LABORATORIA_JOBS_API_URL

Componentes

MUI

Example

import React from 'react';
import ReactDOM from 'react-dom';
import {
  createTheme,
  ThemeProvider,
  StyledEngineProvider,
} from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
// Importamos `AppProvider` y `themeConfig`
import { AppProvider, themeConfig } from '@laboratoria/react';
// Importamos el CSS base...
import '@laboratoria/react/src/theme/index.css';
import App from './components/App';

ReactDOM.render(
  <React.StrictMode>
    <StyledEngineProvider injectFirst>
      <ThemeProvider theme={createTheme(themeConfig)}>
        <AppProvider>
          <CssBaseline />
          <App />
        </AppProvider>
      </ThemeProvider>
    </StyledEngineProvider>
  </React.StrictMode>,
  document.getElementById('root')
);

Dev install

Install omitting peers deps when using via symlink.

npm i --omit peer

FAQs

Package last updated on 09 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc