An Interest In:
Web News this Week
- March 3, 2024
- March 2, 2024
- March 1, 2024
- February 29, 2024
- February 28, 2024
- February 27, 2024
- February 26, 2024
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>
. .
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) .
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 ,
composite / quasar-ssr-nestjs-boilerplate
Quasar Framework + Vue SSR + NestJS API Server = ULTIMATE FULLSTACK
Quasar + SSR + Nest.js Boilerplate
WHATDEPS2USING
- Quasar
- Nestjs
- SWC Loader for increase build speed instead of Babel
- You can rollback to Babel for maximum compatibility.
All files based on Quasar basic template and Nestjs basic template.
WHATSTRUCTURE4PROJECT
- Project
public
: Serve quasar static files.src
: Vue components and client librariessrc-ssr
: Quasar SSR + NestJS + server librariescontroller
: 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
: Standalonemain.ts
of Nestjs for dev server.production-export.ts
: Nest API Server with Quasar SSR. Read info.
test
: E2E test and unit testsFRONT.md
:README.md
for QuasarBACK.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
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To