@team-devmonster/react-router
TypeScript icon, indicating that this package has built-in type declarations

1.3.24 • Public • Published

@team-devmonster/react-router

⚠️ It's under development
⚠️ It's using nextjs

This is under devmonster's react & react-native union project.

This project is part of the react-module & react-native-module projects, that integrate react & react-native by the devmonster team.

react-native => @team-devmonster/react-native-router
General react-modules load map => here;
General react-native-modules load map => here;

Other react modules

author: devmonster

We are always looking for investment or assistance. hompage: https://devmonster.co.kr
email: aldegad@devmonster.co.kr

items

  • [o] [A] => Just tag a
  • [ ] [Header]

Getting started

$ npm install @team-devmonster/react-router@latest

Examples

Easy. Too Easy.

import React from "react";
import { useTheme } from '@team-devmonster/react-theme';
import { Theme } from './App.theme';
import { Div, Button } from "@team-devmonster/react-tags";
import { A } from "@team-devmonster/react-router";

const RouterEx = () => {

  const { color } = useTheme<Theme>();

  return (
    <Div
      style={{
        backgroundColor: color.backgroundColor,
        flex: 1,
        padding: 18
      }}>
      <A href='/themeEx'>
        <Button color={color.primary} style={{ marginBottom: 8 }}>themeEx</Button>
      </A>
      <A href={{
        pathname: '/routerEx/paramEx',
        query: {
          name: 'soohong kim',
          nickname: 'aldegad',
          company: 'devmonster'
        }
      }}>
        <Button color={color.danger} style={{ marginBottom: 8 }}>paramEx</Button>
      </A>
      <A href='https://www.google.co.kr'>
        <Button color={color.warning}>google</Button>
      </A>
    </Div>
  )
}

export default RouterEx;
import React from "react";
import { useTheme } from '@team-devmonster/react-theme';
import { Theme } from "./App.theme";
import { Div, Button, P } from "@team-devmonster/react-tags";
import { A, useRouter } from "@team-devmonster/react-router";

const ParamEx = () => {

  const { color, fontSize, shadow, colorScheme } = useTheme<Theme>();
  const router = useRouter<{ name:string, nickname:string, company:string }>();
  const { query } = router;

  return (
    <Div
      style={{
        backgroundColor: color.backgroundColor,
        flex: 1,
        padding: 18
      }}>
      <P style={{ padding: 8, backgroundColor: color.step300 }}>
        { query.name } / { query.nickname } / { query.company }
      </P>
      <Button onClick={() => router.push({ pathname: 'https://www.google.co.kr', target: '_blank' })} color={color.primary}>push</Button>
      <A back={true}>
        <Button color={color.primary}>Back</Button>
      </A>
    </Div>
  )
}

export default ParamEx;

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.240latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.240
1.3.230
1.3.220
1.3.210
1.3.200
1.3.190
1.3.180
1.3.170
1.3.160
1.3.150
1.3.140
1.3.130
1.3.120
1.3.110
1.3.100
1.3.90
1.3.80
1.3.70
1.3.60
1.3.50
1.3.40
1.3.30
1.3.20
1.3.10
1.3.00
1.2.90
1.2.80
1.2.70
1.2.60
1.2.50
1.2.40
1.2.30
1.2.20
1.2.10
1.2.00
1.1.80
1.1.70
1.1.60
1.1.50
1.1.40
1.1.30
1.1.10
1.1.00
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.10
1.0.00

Package Sidebar

Install

npm i @team-devmonster/react-router

Weekly Downloads

0

Version

1.3.24

License

MIT

Unpacked Size

109 kB

Total Files

81

Last publish

Collaborators

  • mtseo01
  • stmake22
  • aldegad