reesemclean/blueprint

escape {{

Closed this issue · 2 comments

one of my templates is doing this:

return <Widget style={{
            x,
            y
        }} staticStyle={staticStyles} />;

How do i escape the {{? aka, don't let it get picked up by blue print? I tried prefixing with {{ but it actually renders that out in the response.

You can escape it via \:

return <Widget style=\{{ x, y }} />

I have a similar issue and I can't figure out how to escape it properly. This is a React project

export function useGetUser({{camelCase name}}Id) {
	useAsync({
		url: `/{{kebabCase name}}/$\{{{camelCase name}}Id}`,
		actionType: {{camelCase name}}Actions.GET_{{upperSnakeCase name}}_BY_ID_ASYNC,
		dependencies: [{{camelCase name}}Id],
	})
}

desired output for reports

export function useGetUser(reportsId) {
	useAsync({
		url: `/reports/${reportsId}`,
		actionType: reportsActions.GET_REPORTS_BY_ID_ASYNC,
		dependencies: [reportsId],
	})
}

What's the right syntax?