Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 21, 2022 08:31 am GMT

Vue 3.2

React ?

Vue . Vuex .
React . Redux .
Vuex Deprecated . .

Vue 3.2 .
3.2 .
.
React .
Vue . .
, .

<script setup>

. . . Vue Composition API setup() . <script setup> API defineProps() vue .
. .

<script>//  defineComponent     export default {  name: '',  props: [...  ],  components: [...    ],  setup() {    return {      ...          }  }}</script>


<script setup> import  from 'path/to/component.vue'defineProps([...  ])// ? component  ?  .defineExpose({  ...      });</script>

. .

, defineProps import . .

expose

, setup ,
, 3.2 .
3.2 .
3.2 1 . ... ?

, expose . '' . .

, .
. .

<script>export default {  setup(props, { expose }) {    const counter = ref(0);    const privateFunc = () => { ... };    const publicFunc = () => void (counter = 0);    expose({ counter, publicFunc });  }}</script>

expose setup return . .
, , (Render Function) .

. , JSX/TSX Vue .

setup , return , .

import { h, ref } from 'vue'export default {  setup() {    const count = ref(0)    return () => h('div', count.value)  }}

, , , JSX/TSX . JSX ,

import { h, ref } from 'vue'export default {  setup() {    const count = ref(0)    return () => <div>{ count.value }</div>  }}

. React Vue .
Vue ? expose .

vue SFC , Vue .

, React , Vue ( ) .
React Vue . .
React , React . ...
Vue . .

Vue ,

GitHub logo composite / quasar-ssr-nestjs-boilerplate

Quasar Framework + Vue SSR + NestJS API Server = ULTIMATE FULLSTACK

Quasar + SSR + Nest.js Boilerplate

WHATDEPS2USING

All files based on Quasar basic template and Nestjs basic template.

WHATSTRUCTURE4PROJECT

  • Project
    • public: Serve quasar static files.
    • src: Vue components and client libraries
    • src-ssr: Quasar SSR + NestJS + server libraries
      • controller: Nestjs controllers.
      • middleware: Nestjs and Quasar Middlewares(Read it first for quasar middleware).
      • service: Nestjs service and providers.
      • app.module.js: Nestjs App Module.
      • standalone.ts: Standalone main.ts of Nestjs for dev server.
      • production-export.ts: Nest API Server with Quasar SSR. Read info.
    • test: E2E test and unit tests
    • FRONT.md: README.md for Quasar
    • BACK.md: README.md for Nestjs

FEATURE4YOU

  • Quasar SSR

Quasar , . Vue .

.


Original Link: https://dev.to/composite/vue-32-eseo-pilsuro-jipgo-neomeogaya-hal-mirae-4mcc

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To