generic component in wechat mini

Generic Item View

In our example omponent, we have a item-view custom component that will be applied as a generic component.

pages/example/example.wxml

In other pages, when we create a generic component and create a tag called selectable. You can name this whatever you want.

For example, in custom component pageView page-view’s index.json and index.wml, we declare custom generic tag called “rickycao” under componentGeneric:

index.json

Then use it in the wx html file like this:

index.wxml

In order to use rickycao tag, it is looking for a custom component that serves as generic (as indicated in componentGenerics). So when we use
the tag rickycao, we know which custom component to use.

In order to provide this generic, we must do so like this:

generic:rickytsao, and as a property of using our pageView component.

example.wxml

where item-view is declared in:

example.json

Let’s use the custom tag itemview

components/page-view/index.json

Then in that wx html file, we use it as a tag and then insert our values into its properties.

components/page-view/index.wxml

We use a custom component, and then say that we are applying our item-view component as a generic component:

triggerEvent (wechat mini)

Example

example.json

Notice here we have declared the generic:itemview to take on our item-view component here. item-view was imported in our .json file.
example.wxml

example.wxss

Item View

item-view.js

item-view.json

item-view.wxml

item-view.wxss

Stative Verbs

ref –

  • https://www.englishwithashish.com/stative-verbs-guide/
  • https://www.englishwithashish.com/linking-verbs-and-stative-verbs/

Stative Verbs

Stative verbs describe states. They do not describe actions.

Stative verbs indicate the following state of a subject:

Mental or Cognitive state: think, believe, doubt, guess, remember, pretend, recognize, recall, guess, forget, agree, disagree, need, prefer, satisfy
Emotional state: love, hate, adore, abhor, like, dislike, appreciate, envy, detest, loathe
Senses: see, hear, feel, seem, taste, smell, sense, sound
Possessional state: have, belong, possess, own, belong, want
Others (condition): weigh, contain, involve, concern, lack, deserve, matter, resemble

For example:

√ I am late.
(Here, “am” is a stative verb. It describes a state.)

X I caught a fish.
(“Caught” is not a stative verb. It describes an action. It is an action verb.)

√ John knows where the treasure is hidden.
(Here, “knows” is a stative verb. “Is” is also a stative verb. They both describe states.)

X John found the treasure.
(“Found” is not a stative verb. It describes an action. It is an action verb.)

Thoughts

Sarah agrees with you.

I believe that karma is real.

Time and health are two precious assets that we don’t recognize and appreciate until they have been depleted. (Author Denis Waitley)
(“Are” in this sentence is also a stative verb.)

Here are another five common stative verbs related to thoughts:

  • imagine
  • know
  • remember
  • think
  • understand

Feelings

Lee loves pies.
Mark and Craig prefer cakes.
I am prepared for the worst, but hope for the best.
(“Am” in this sentence is also a stative verb.)

Here are another five common stative verbs related to feelings:

  • hate
  • like
  • value
  • want
  • wish

Senses:

I feel sick.
All seems well.

Here are another five common stative verbs related to senses:

  • appear
  • look
  • see
  • smell
  • taste

Possession

That dog belongs to me.
Ask the farmer who owns the field.

Science fiction is a kind of literature that embodies the highest aspirations of the human race. (Author Harlan Ellison)
(“Is” in this sentence is also a stative verb.)

Here are another five common stative verbs related to possession:

  • consist
  • comprise
  • have
  • include
  • possess

Measurements:

This statue weighs a lot.
Your feet reach the end of the bed.
The problem spans two decades.
The marrow measures six inches.

More Importantly

Example 1:

I remembered where I left the keys. correct
I was remembering where I left the keys. wrong

(Stative verbs are not used in the past continuous tense.)

Example 2:

That dog belongs to me. correct
That dog is belonging to me. wrong

(Stative verbs are not used in the present continuous tense.)

Example 3:

All will appear normal. correct
All will be appearing normal. wrong

(Stative verbs are not used in the future continuous tense.)

If a stative verb is used in a continuous tense, native English speakers will treat it as an action verb, not a stative verb.

For example:

I was remembering where I left the keys. correct
(Native English speakers would assume that the speaker was in the act of remembering. In other words, they would treat it as an action verb not a stative one.)

More examples

Ashish loves his parents more than anyone in the world.
Nobody likes to talk to Rohan. He brags too much about his job.
I hated Mathematics for many years.
Do you believe in God?
He pretended to be a cop in front of my friends.
I can’t recall the date.
Every time we doubted him, he proved us wrong.
How can he dislike chocolates?
We appreciate what Max has done for our family.
He needed food very badly.
You seem upset about something.
The food tastes awful.
You smell great.
He sounds quite confident.
All of us have a gaming laptop.
She wanted a cook.
The syrup contains alcohol.
Shami deserves the credit for this win.

How to use calendar

You have a calendar component.
You want to use it in courses, so you set it up like this:

courses.json

courses.wxml

courses.js

wechat mini – fetch, get user test

pages/index/index.wxml

pages/index/index.wxss

pages/index/index.js

app.js

Video Ideas

China vs America (Sea Turtle Diaries)

schools
coffee
dating
marriage
drinks temperature
education
dress style

Present Perfect vs Present Perfect Continuous

ref –

  • https://www.grammarwiz.com/difference-present-perfect-and-present-perfect-continuous.html
  • https://www.oxfordlearnersdictionaries.com/grammar/online-grammar/present-perfect-simple-and-present-perfect-continuous
  • https://www.youtube.com/watch?v=7NGLHYVmr00

Present Perfect: Has/Have + Past Participle

e.g. He has passed his driving test

Present Perfect Continuous: Has/Have + Been + Present Participle

e.g. She has been reading a book

The broad rule is that although both tenses relate to the fact that something is being referred to in the past, the present perfect refers to something that has completed and the focus is on the result of that action, but the present perfect continuous refers to something that is continuing in the present and the focus is on the duration.

Can Choose Either

In some cases we can choose either of the tenses.
This is usually the case when we are referring to biographical type facts about someone’s life, often with the words for and since or some other time frame.

For example:

He’s eaten red meat his whole life
He’s been eating red meat his whole life

He’s worked for the company since he was a teenager
He’s been working for the company since he was a teenager

I’ve lived here for three years
I’ve been living here for three years

They’ve studied English since high school
They’ve been studying English since high school

Short Term or Long Term Action

These facts in the examples above tend to be long-term. However, we tend to use the present perfect continuous to emphasize the fact that an event or activity has been happening over a period of time that is relatively short-term.

I’ve been playing tennis for two hours (short-term)

Compare the long-term, which could be either present perfect or present perfect continuous:

I’ve played tennis most of my life (long-term)
I’ve been playing tennis most of my life (long-term)

Continuing or Completed Action

Another difference between the present perfect and the present perfect continuous is when we want to show whether something is completed or not.
The continuous tense shows that it is not completed.

Compare these:

He has read the book about JFK (the book is finished)
He has been reading the book about JFK (the book’s still being read)

She has taken the medicine (action completed)
She has been taking the medicine (referring to medicine that is being taken over a period of time)

Repeated or Single Action

This is similar to the previous one, but it shows the continuous form can be used to show that something is repeated:

Your wife has phoned you (may have been only once)
Your wife has been phoning you – (she has rung several or many times)

I’ve gone to the local swimming pool (could just be once)
I’ve been going the local swimming pool (indicates going there on several or many occasions)

Examples

State Verbs

State verbs are those that represent a state of mind, such as thinking, knowing, wanting, seeing etc.

Though there are some we can use in the present perfect continuous tenses,
generally most are cannot be used in the continuous tense and
so they are only used with the present perfect:

For instance, we don’t say this:

She has been knowing him for 3 days (X)
He has been seeing the car go past every day (X)

We would say:

She has known him for 3 days (√)
He has seen the car go past every day (√)

Future (perfect continuous)

ref – https://www.natterandramble.co.uk/future-perfect-continuous-uses-form-timeline/

[will] + [have] + [been] + [present participle]

The future perfect continuous depicts past/present/future actions that continue up until a certain point. Like the future perfect and future continuous, it’s used with a specified time.

sentence: By October, we will have been working on the project for over a year.
explanation: They started working on this project in the past or present.
It will continue up to October, which marks their 1 year.

sentence: In ten minutes, my parents will have been waiting in traffic for four hours.
explanation: Their parents were stuck in traffic. (past) When it continue up to a certain point (ten minutes), they will have waited for 4 hours.

Future (continuous)

ref – https://www.natterandramble.co.uk/future-continuous-form-uses-timeline/

[will] + [be] + verb [present participle ] + ing

Use the future continuous tense for future actions happening over a period of time, especially when a specific time is mentioned. The future continuous tense also shows more certainty and likelihood than the simple future.

By this time tomorrow, I will be drinking margaritas on the beach.

We will be attending a meeting from noon until 3 p.m.

Future (simple)

ref – https://www.natterandramble.co.uk/future-simple-tense-form-uses-timeline/

Use the simple future for actions that have not happened yet but will later. To form the simple future, just place the modal verb will before the root form of the main verb. (Note that if the action will happen in the near future, you can use the present continuous instead.)

She will be president one day.

I will not go to the wedding without a date!