Skip to content

Commit

Permalink
feat: memo 还是不立即用比较好点..
Browse files Browse the repository at this point in the history
  • Loading branch information
radiorz committed Nov 16, 2022
1 parent f32c70a commit 8e83528
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions snippets/rn_func_component.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
const { origin: fileHeader } = require("./file_header");
const { origin: fileName } = require("./file_name");
const body = `${fileHeader}
import { View, Text } from 'react-native'
import React, { useState, useEffect, memo } from 'react'
import { View, Text } from 'react-native'
function \${1:${fileName}}() {
function \${1:${fileName}}() {
return (
<View>
<Text>\${1:${fileName}}</Text>
</View>
)
}
export default memo(\${1:${fileName}})
export default \${1:${fileName}}
`;

Expand Down

0 comments on commit 8e83528

Please sign in to comment.