open-index/open-npm huggingface dataset:
npm package: @metomic/alias-react
Description: Use metomic Alias with your react application
Author: metomic
Latest version: 0.3.3

# @metomic/alias-react

> Use metomic alias with your react application

[![NPM](https://img.shields.io/npm/v/@metomic/alias-react.svg)](https://www.npmjs.com/package/@metomic/alias-react)

## Install

```bash
yarn add @metomic/alias-react
```

## Usage

### Step 1. Configure an AliasProvider at the top level
```tsx
// in your main / index / app root
import React from 'react'
import {AliasProvider} from '@metomic/alias-react'

ReactDOM.render(
  // your appId is given to you when you join the Alias alpha
  <AliasProvider appId={"YOUR-APP-ID"}> 
    <App />
  </AliasProvider>
, document.getElementById('root'))

```

### 2. Use the useAlias hook in your component
```tsx
import {useAlias, AliasToggle} from '@metomic/alias-react

const MySignupBox = () => {
  // Provide a purpose for this alias
  const {ref, toggleSecured, isSecured, } = useAlias({ purpose: 'marketing' })

  return (
    <div>
      {/* To make alias work, the alias "ref" parameter has to be provided to the input element you wish to use */}
      <input ref={ref}>
      
      {/* Finally, set up a toggle to control whether or not the mail address is secured */}
      <AliasToggle onChange={toggleSecured} />
    </div>
  )


}

```



## License

MIT © [metomic](https://github.com/metomic)
npm package: @metonym/sapper
Description: The next small thing in web development, powered by Svelte
Author: Rich Harris
Latest version: 0.27.12

# sapper

[The next small thing in web development, powered by Svelte.](https://sapper.svelte.dev)

This is a fork of Sapper that contains the following changes:

- Remove service worker
- Change export folder from `__sapper__/export` to `public`
- Remove `__sapper__` folder after exporting

## What is Sapper?

Sapper is a framework for building high-performance universal web apps. [Read the guide](https://sapper.svelte.dev/docs) or the [introductory blog post](https://svelte.dev/blog/sapper-towards-the-ideal-web-app-framework) to learn more.

## Get started

Clone the [starter project template](https://github.com/sveltejs/sapper-template) with [degit](https://github.com/rich-harris/degit)...
When cloning you have to choose between rollup or webpack:

```bash
npx degit "sveltejs/sapper-template#rollup" my-app
# or: npx degit "sveltejs/sapper-template#webpack" my-app
```

...then install dependencies and start the dev server...

```bash
cd my-app
npm install
npm run dev
```

...and navigate to [localhost:3000](http://localhost:3000). To build and run in production mode:

```bash
npm run build
npm start
```

## Development

Pull requests are encouraged and always welcome. [Pick an issue](https://github.com/sveltejs/sapper/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) and help us out!

To install and work on Sapper locally:

```bash
git clone https://github.com/sveltejs/sapper.git
cd sapper
npm install
npm run dev
```

### Linking to a Live Project

You can make changes locally to Sapper and test it against a local Sapper project. For a quick project that takes almost no setup, use the default [sapper-template](https://github.com/sveltejs/sapper-template) project. Instruction on setup are found in that project repository.

To link Sapper to your project, from the root of your local Sapper git checkout:

```bash
cd sapper
npm link
```

Then, to link from `sapper-template` (or any other given project):

```bash
cd sapper-template
npm link sapper
```

You should be good to test changes locally.

### Running Tests

```bash
npm run test
```

## License

[MIT](LICENSE)